chore(lint): pin the ruff rule set explicitly - #322
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocks the recurring ruff version bump (#315, previously #306/#313).
Problem
[tool.ruff]sets nolint.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, soruff check server/ tests/goes from clean to 460 errors and the requiredtestjob fails at the lint step. Dependabot has now opened this bump three times.Fix
Select
E4/E7/E9/Fexplicitly — exactly what ruff enforced by default through 0.15. The enforced contract is unchanged; this records the rules we already meet.Verified
ruff check server/ tests/on 0.16.0 with this configruff check server/ tests/on 0.15.21 with this configThat 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.