Skip to content

refactor: enable additional ruff rules and fix violations#584

Merged
mergify[bot] merged 1 commit intomainfrom
devs/jd/fix/ruff-extra-rules/I88ea78e2254b8a9fee00743464e44e6d33400f47
Feb 19, 2026
Merged

refactor: enable additional ruff rules and fix violations#584
mergify[bot] merged 1 commit intomainfrom
devs/jd/fix/ruff-extra-rules/I88ea78e2254b8a9fee00743464e44e6d33400f47

Conversation

@jd
Copy link
Copy Markdown
Owner

@jd jd commented Feb 18, 2026

Enable C4, FURB, PERF, PIE, RET, RUF, SIM, TCH rule sets.

Key changes:

  • Remove all stale noqa comments across the codebase (RUF100)
  • Sort all alphabetically (RUF022)
  • Remove superfluous else after return/raise (RET505/RET506)
  • Replace try/except/pass with contextlib.suppress (SIM105)
  • Move type-only imports into TYPE_CHECKING blocks (TC001/TC003)
  • Quote type expressions in typing.cast() calls (TC006)
  • Use list comprehension instead of loop-append (PERF401)
  • Fix Cyrillic character in docstring (RUF002)
  • Remove unnecessary int() wrapping round() (RUF046)
  • Replace dict() call with literal (C408)

Ignored rules:

  • RUF003: ambiguous unicode in comments (copyright holder names)
  • RUF005: iterable unpacking vs concatenation (less readable)
  • RUF012: mutable class defaults (false positive on test fixtures)
  • SIM108: ternary expressions (less readable in context)

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Enable C4, FURB, PERF, PIE, RET, RUF, SIM, TCH rule sets.

Key changes:
- Remove all stale noqa comments across the codebase (RUF100)
- Sort __all__ alphabetically (RUF022)
- Remove superfluous else after return/raise (RET505/RET506)
- Replace try/except/pass with contextlib.suppress (SIM105)
- Move type-only imports into TYPE_CHECKING blocks (TC001/TC003)
- Quote type expressions in typing.cast() calls (TC006)
- Use list comprehension instead of loop-append (PERF401)
- Fix Cyrillic character in docstring (RUF002)
- Remove unnecessary int() wrapping round() (RUF046)
- Replace dict() call with literal (C408)

Ignored rules:
- RUF003: ambiguous unicode in comments (copyright holder names)
- RUF005: iterable unpacking vs concatenation (less readable)
- RUF012: mutable class defaults (false positive on test fixtures)
- SIM108: ternary expressions (less readable in context)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change-Id: I88ea78e2254b8a9fee00743464e44e6d33400f47
@jd jd force-pushed the devs/jd/fix/ruff-extra-rules/I88ea78e2254b8a9fee00743464e44e6d33400f47 branch from 7e052e1 to ad044de Compare February 19, 2026 06:48
@jd jd marked this pull request as ready for review February 19, 2026 06:49
@mergify mergify Bot merged commit 9686ed7 into main Feb 19, 2026
9 checks passed
@mergify mergify Bot deleted the devs/jd/fix/ruff-extra-rules/I88ea78e2254b8a9fee00743464e44e6d33400f47 branch February 19, 2026 06:50
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 19, 2026

Merge Queue Status

Rule: default


  • Entered queue2026-02-19 06:50 UTC
  • Checks passed · in-place
  • Merged2026-02-19 06:50 UTC · at ad044de8a8fa531ed67a8a18c1dd69ed47f5f7ad

This pull request spent 25 seconds in the queue, including 3 seconds running CI.

Required conditions to merge

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