Skip to content

Pin ruff's rule selection and bump the pre-commit hook to 0.17.2 - #964

Merged
gijzelaerr merged 1 commit into
masterfrom
chore/ruff-select
Oct 28, 2026
Merged

gijzelaerr merged 1 commit into
masterfrom
chore/ruff-select

Conversation

@gijzelaerr

Copy link
Copy Markdown
Owner

Ruff 0.16 enlarged its default rule set. The project never set select, so ruff check with the ruff in uv.lock (0.17.2) reports 454 findings on master (UP006, BLE001, I001, DTZ001, ...), while the pre-commit hook, pinned at v0.14.10, reports none.

  • [tool.ruff.lint] now selects the previous defaults (E4, E7, E9, F) explicitly, so every ruff version checks the same rules.
  • The ruff pre-commit hook moves to v0.17.2, the version in uv.lock.

No code changes: with these settings ruff 0.17.2 reports no findings and ruff format --check is clean. pre-commit run --all-files passes.

Adopting any of the new rules (for example the autofixable UP006/I001) would be a separate PR.

Changelog

None (development tooling only).

Ruff 0.16 enlarged its default rule set, so ruff 0.17.2 from uv.lock reported
454 findings on master while the pre-commit hook (v0.14.10) reported none.
Select the previous defaults (E4, E7, E9, F) explicitly so every ruff version
checks the same rules, and run the same ruff in pre-commit as in uv.lock.
@gijzelaerr
gijzelaerr merged commit 2d44e83 into master Oct 28, 2026
20 checks passed
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.

1 participant