Skip to content

chore(lint): pin the ruff rule set explicitly - #322

Merged
smaramwbc merged 1 commit into
mainfrom
chore/pin-ruff-lint-select
Aug 2, 2026
Merged

chore(lint): pin the ruff rule set explicitly#322
smaramwbc merged 1 commit into
mainfrom
chore/pin-ruff-lint-select

Conversation

@smaramwbc

Copy link
Copy Markdown
Owner

Unblocks the recurring ruff version bump (#315, previously #306/#313).

Problem

[tool.ruff] sets no lint.select, so the project inherits ruff's default rule set — and that default changes between releases. Ruff 0.16 widened it from 59 rules to 413, so ruff check server/ tests/ goes from clean to 460 errors and the required test job fails at the lint step. Dependabot has now opened this bump three times.

Fix

Select E4/E7/E9/F explicitly — exactly what ruff enforced by default through 0.15. The enforced contract is unchanged; this records the rules we already meet.

Verified

check result
ruff check server/ tests/ on 0.16.0 with this config ✅ All checks passed
ruff check server/ tests/ on 0.15.21 with this config ✅ All checks passed (safe to land before the bump)
E711 / E721 / F403 / F405 still caught ✅ confirmed against a probe file

That last row matters: ruff 0.16's new defaults are not a superset of 0.15's — they silently drop E711 (none-comparison), E721 (type-comparison) and F403 (star-import). Merging the bump without this would have quietly reduced coverage even if the 460 errors were fixed.

Deliberately widening the rule set is a separate decision, tracked in #314.

Ruff's default selection changes between releases. 0.16 widened it from 59
rules to 413, so a routine version bump surfaced 460 lint errors and the
required test job failed at the lint step (the third time this has blocked a
ruff bump).

Select E4/E7/E9/F explicitly: exactly the set ruff enforced by default
through 0.15, so the enforced contract is unchanged. Verified that
`ruff check server/ tests/` passes on both 0.15.21 and 0.16.0 with this
config, and that E711/E721/F403 — which 0.16's new defaults would have
silently stopped checking — are still enforced.

Widening the selection deliberately is tracked in #314.
@smaramwbc
smaramwbc merged commit 29bca38 into main Aug 2, 2026
5 checks passed
@smaramwbc
smaramwbc deleted the chore/pin-ruff-lint-select branch August 2, 2026 19:49
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