Skip to content

chore: add ruff format hook to pre-commit config - #18244

Merged
chalmerlowe merged 1 commit into
mainfrom
chore/add-ruff-format-pre-commit
Aug 28, 2026
Merged

chore: add ruff format hook to pre-commit config#18244
chalmerlowe merged 1 commit into
mainfrom
chore/add-ruff-format-pre-commit

Conversation

@chalmerlowe

Copy link
Copy Markdown
Contributor

The Problem

The repository pre-commit configuration only ran ruff-check for sorting and fixing imports (--select I --fix). It did not run ruff format on staged files. As a result, commits could pass local pre-commit checks but subsequently fail repository lint sessions during presubmit testing due to formatting discrepancies.

The Solution

  • Added the ruff-format hook to .pre-commit-config.yaml
  • Configured arguments --target-version=py310 and --line-length=88 to align with the formatting standards enforced across the repository's lint Nox sessions.

Notes to Reviewers

  • This change ensures that code formatting is automatically applied locally prior to commit, matching what our CI/CD lint sessions expect.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the .pre-commit-config.yaml file to include the ruff-format hook, ensuring that code formatting is automatically applied alongside the linter. There are no review comments, and I have no feedback to provide.

@chalmerlowe chalmerlowe self-assigned this Aug 28, 2026
@chalmerlowe
chalmerlowe marked this pull request as ready for review August 28, 2026 18:19
@chalmerlowe
chalmerlowe requested a review from a team as a code owner August 28, 2026 18:19
@chalmerlowe
chalmerlowe merged commit 1434df1 into main Aug 28, 2026
39 checks passed
@chalmerlowe
chalmerlowe deleted the chore/add-ruff-format-pre-commit branch August 28, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants