ci: pin ruff select to the intended F + core-E policy (unblocks all PRs) - #55
Merged
Conversation
The ruff workflow runs `ruff check src/ bin/` on every PR but never on main, so main accumulated ~400 lint findings that failed CI on every subsequent PR regardless of the diff. The config set `ignore` but never pinned `select`, and its own comment states the intent is "F + other E" — under exactly that policy the codebase is clean (0 findings). Without an explicit select, newer ruff enabled ~10 extra rule families (pyupgrade `List`->`list` alone is ~310 of the findings), none of them real F/E issues. Pin `select = ["E4","E7","E9","F"]` to match the documented intent and make it stable across ruff default changes. Greens CI with zero code changes. Opting into pyupgrade/import-sort/etc. later is a deliberate choice + its own cleanup. Verified: `ruff check src/ bin/` → All checks passed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
The
ruff Checkworkflow runsruff check src/ bin/onpull_requestonly — never onmain. Somainaccumulated ~400 lint findings that were never gated, and now every PR fails ruff on that pre-existing backlog, regardless of what it changes.Root cause
[tool.ruff.lint]setsignorebut never pins aselect. Its own comment states the intent — "real issues (F, other E) stay enforced." Under exactly that policy the codebase is clean:Without an explicit
select, newer ruff enforces ~10 extra rule families that were never intended. ~310 of the ~400 findings areUP006(List→listPEP-585 modernization); the rest are import-sorting, blind-except, etc. Zero realF/Eissues. The last config commit (04d68c9) clearly meant F+E and just forgot to pinselect; it passed on that ruff version and drifted since.Fix
Pin the select to the documented intent:
Verification
ruff check src/ bin/(config-driven, no CLI flags) → All checks passed!🤖 Generated with Claude Code