State the ruff rule set instead of inheriting it - #138
Merged
Conversation
ci.yml says the rule selection lives in pyproject.toml and is deliberately narrow -- correctness rules, not style -- but pyproject.toml never said so: it set only target-version and left the rules to ruff's default. That default is not a fixed set. A ruff release has since widened it, and because the workflow installs the current ruff, `ruff check` now reports 757 findings on an unmodified main (UP031 percent formatting, BLE001, SIM117 and friends, in files nobody has touched) and the Lint job fails on every pull request. Select E4, E7, E9 and F explicitly, which is what the workflow comment describes and what the per-file-ignores below were written against. Lint passes on main again, and a future ruff release cannot turn every open pull request red without a change in this repository. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Aug 3, 2026
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.
Independent of the five security PRs (#133–#137), but they are all red on Lint
because of this, so it is worth landing first.
ci.ymlsays the rule selection lives inpyproject.tomland is deliberatelynarrow — correctness rules, not style.
pyproject.tomlnever actually said so:it set
target-versionand left the rules to ruff's default. That default isnot a fixed set, and a ruff release has since widened it. Because the workflow
does
pip install ruff(unpinned),ruff checknow reports 757 findings onan unmodified
main— UP031 percent formatting, BLE001, SIM117 and friends,in files nobody has touched, including
.github/downstream/*.py— and the Lintjob fails on every pull request.
This selects
E4,E7,E9,Fexplicitly: the set the workflow commentdescribes, and the one the existing
per-file-ignores(E402in__init__.py,E741/F841inbase.py) were written against. With it,ruff checkpasseson
mainand on each of the security branches, and a future ruff releasecannot turn every open pull request red without a change in this repository.
Verified with ruff 0.16.1: 757 findings before,
All checks passed!after.🤖 Generated with Claude Code