Migrate ruff suppressions to ruff:ignore syntax - #612
Merged
Conversation
ruff 0.15.22 stabilizes RUF105 (noqa-comments) and RUF201 (rule-codes-in-selectors) under the repo's select=ALL + preview config. Apply ruff --fix to convert '# noqa: CODE' suppressions to '# ruff:ignore[name]', and manually correct two wrapped imports where the autofix misplaced the suppression comment. Passes under both ruff 0.15.21 and 0.15.22. 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.
Resolves the lint failures blocking Dependabot PR #610 (ruff-pre-commit bump to 0.15.22).
Why
The repo lints with
select = ["ALL"]andpreview = true. ruff 0.15.22 stabilizes two rules that fire under that config across the tree:noqa-comments— prefers# ruff:ignore[…]over# noqa: …for ruff's own codesrule-codes-in-selectors— prefers rule names over codes in selectorsThis currently fails
pre-commit.ci, which is a required check — so it blocks all PRs tomain, not just #610.Change
ruff --fixconverts# noqa: CODE→# ruff:ignore[name](365 fixes across 43 files).test_cc_address_plan.py,test_cc_ir.py) where the autofix left the suppression on the wrong physical line.Verified
ruff check+ruff format --checkclean under both 0.15.21 (current pin) and 0.15.22 (incoming via #610), so it's safe to merge before or after #610.🤖 Generated with Claude Code