Skip to content

State the ruff rule set instead of inheriting it - #138

Merged
roed314 merged 1 commit into
roed314:mainfrom
roed-math:ci-ruff-ruleset
Aug 3, 2026
Merged

State the ruff rule set instead of inheriting it#138
roed314 merged 1 commit into
roed314:mainfrom
roed-math:ci-ruff-ruleset

Conversation

@roed-math

Copy link
Copy Markdown

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.yml says the rule selection lives in pyproject.toml and is deliberately
narrow — correctness rules, not style. pyproject.toml never actually said so:
it set target-version and left the rules to ruff's default. That default is
not a fixed set, and a ruff release has since widened it. Because the workflow
does pip install ruff (unpinned), ruff check now reports 757 findings on
an unmodified main
— UP031 percent formatting, BLE001, SIM117 and friends,
in files nobody has touched, including .github/downstream/*.py — and the Lint
job fails on every pull request.

This selects E4, E7, E9, F explicitly: the set the workflow comment
describes, and the one the existing per-file-ignores (E402 in __init__.py,
E741/F841 in base.py) were written against. With it, ruff check passes
on main and on each of the security branches, and a future ruff release
cannot 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

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>
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.

2 participants