Pin ruff and make the lint gate explicit - #74
Merged
Merged
Conversation
CI installs ruff unpinned and the repo declares no rule selection, so the lint gate was whatever that month's ruff considered default. Ruff's defaults have since grown well beyond the original E4/E7/E9/F, and `ruff check .` now reports 125 errors on unmodified master - across LOG015, UP031, BLE001, SIM115 and others - so every pull request fails lint for reasons that have nothing to do with its contents. Select the rules explicitly and pin ruff in CI. The selection is exactly what master already passes, so this restores the gate to what it was actually enforcing rather than silently adopting a much stricter one; broadening it is now a deliberate edit instead of a side effect of a ruff release. target-version is py310 rather than the py39 inferred from requires-python, because dumper/extract_mapping.py already uses a match statement and the CI matrix starts at 3.10. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0179M4xvAKPGrgKpy4AeCsM7
Merged
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
Master's CI is red, and has been for a while — independently of any of the other open PRs.
CI runs
pip install ruff(unpinned) and the repo declares no rule selection, so the lint gate has been "whatever this month's ruff considers default". Ruff's defaults have grown well past the originalE4/E7/E9/F, and on unmodified masterruff check .now reports:spread across
LOG015(36),UP031(29),BLE001(10),UP004(8),SIM115,C403,I001and others. Every PR fails lint for reasons unrelated to its contents — #71, #72 and #73 all went red on this.Fix
Select the rules explicitly, and pin ruff in CI.
The selection is exactly what master already passes (
E4,E7,E9,F), so this restores the gate to what it was actually enforcing rather than silently adopting a much stricter one. Widening it is now a deliberate edit rather than a side effect of a ruff release — and widening it is worth doing, but as its own reviewable change, since ~76 of those errors are real modernization work (class Foo(object),%-formatting,IOError) rather than noise.target-versionispy310, not thepy39that would be inferred fromrequires-python:dumper/extract_mapping.pyalready uses amatchstatement, and the CI matrix starts at 3.10.Verification
Note
This should land first — #71, #72 and #73 are all red solely because of this, and will need a CI re-run once it's on master.