Skip to content

BEHAVIOR: use Ruff rule names, not codes - #677

Merged
redeboer merged 5 commits into
mainfrom
ENH/ruff-0.16
Jul 26, 2026
Merged

BEHAVIOR: use Ruff rule names, not codes#677
redeboer merged 5 commits into
mainfrom
ENH/ruff-0.16

Conversation

@redeboer

@redeboer redeboer commented Jul 26, 2026

Copy link
Copy Markdown
Member

Closes #676

❗ Behavioral changes

  • The Ruff configuration generated by check-dev-files now identifies rules by name instead of by code, both in [tool.ruff.lint] ignore and in [tool.ruff.lint.per-file-ignores]any-type instead of ANN401, undocumented-public-module instead of D100, private-member-access instead of SLF001, and so on. Prefix selectors that have no single rule name (ANN, D, DOC, FBT, PTH, T20, …) remain as codes.
  • Selecting rules by name requires Ruff's preview mode. The policy already writes preview = true to [tool.ruff], so downstream repositories need no extra opt-in, but a repository that disables preview will now fail with Invalid selector.
  • docs/conf.py is now granted builtin-variable-shadowing on top of undocumented-public-module, so Sphinx's copyright = ... assignment no longer needs an inline suppression.
  • Code-based ignores that already exist in a downstream pyproject.toml are merged rather than rewritten, so those configurations will list both the old code and the new name until the codes are pruned by hand.

Squash commit messages

* BEHAVIOR: ignore `builtin-variable-shadowing` in `docs/conf.py`
* MAINT: migrate `noqa` comments to `ruff: ignore` syntax

@redeboer redeboer added this to the 0.9.3 milestone Jul 26, 2026
@redeboer redeboer self-assigned this Jul 26, 2026
@redeboer redeboer added the ❗ Behavior Changes that may affect the framework output label Jul 26, 2026
@redeboer redeboer changed the title BEHAVIOR: adapt to Ruff v0.16 BEHAVIOR: use Ruff rule names, not codes Jul 26, 2026
@redeboer redeboer added 🔨 Maintenance Maintenance and upkeep improvements 🖱️ DX Improvements to the Developer Experience and removed 🔨 Maintenance Maintenance and upkeep improvements 🖱️ DX Improvements to the Developer Experience labels Jul 26, 2026
@redeboer
redeboer merged commit 6bed59e into main Jul 26, 2026
44 checks passed
@redeboer
redeboer deleted the ENH/ruff-0.16 branch July 26, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

❗ Behavior Changes that may affect the framework output

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update policy for Ruff 0.16

1 participant