Skip to content

Migrate ruff suppressions to ruff:ignore syntax - #612

Merged
bboe merged 1 commit into
mainfrom
fix-ruff-0.15.22-lint
Jul 26, 2026
Merged

Migrate ruff suppressions to ruff:ignore syntax#612
bboe merged 1 commit into
mainfrom
fix-ruff-0.15.22-lint

Conversation

@bboe

@bboe bboe commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Resolves the lint failures blocking Dependabot PR #610 (ruff-pre-commit bump to 0.15.22).

Why

The repo lints with select = ["ALL"] and preview = true. ruff 0.15.22 stabilizes two rules that fire under that config across the tree:

  • RUF105 noqa-comments — prefers # ruff:ignore[…] over # noqa: … for ruff's own codes
  • RUF201 rule-codes-in-selectors — prefers rule names over codes in selectors

This currently fails pre-commit.ci, which is a required check — so it blocks all PRs to main, not just #610.

Change

  • ruff --fix converts # noqa: CODE# ruff:ignore[name] (365 fixes across 43 files).
  • Manually corrected two wrapped imports (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 --check clean 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

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>
@bboe
bboe enabled auto-merge July 26, 2026 21:41
@bboe
bboe merged commit 7339207 into main Jul 26, 2026
30 checks passed
@bboe
bboe deleted the fix-ruff-0.15.22-lint branch July 26, 2026 21:44
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.

1 participant