Skip to content

Resolve ruff lint findings without noqa suppressions - #145

Open
tcarroll-kroll wants to merge 3 commits into
mainfrom
feature/update-prek
Open

Resolve ruff lint findings without noqa suppressions#145
tcarroll-kroll wants to merge 3 commits into
mainfrom
feature/update-prek

Conversation

@tcarroll-kroll

Copy link
Copy Markdown
Member

Summary

  • Bundle WorkerBatcher's tuning knobs into a WorkerBatcherOptions dataclass, dropping the noqa: PLR0913 suppression on its constructor
  • Rewrite detect_image_format as a table of magic-number checks, dropping the noqa: PLR0911 suppression
  • Name the magic constant in test_image_data.py instead of noqa: PLR2004
  • Hoist the CancelledError raise out of the try block in test_timeout_behavior.py to satisfy TRY301 without a noqa
  • Left the PERF203/BLE001 noqas in place — they mark deliberate control-flow and gRPC callback-contract exceptions
  • Also includes ignoring CPY001 (copyright header) in ruff config, needed as a prerequisite for the lint fixes to pass the repo's pre-commit hooks

Test plan

  • ruff check . passes clean
  • uv run pytest -q -m "not functional and not e2e and not soak" — 165 passed

Project files don't carry copyright headers; ignore the rule instead
of adding headers repo-wide.
Replaces the WorkerBatcher noqa: PLR0913 suppression by grouping its
tuning knobs into a WorkerBatcherOptions dataclass, rewrites
detect_image_format as a table of magic-number checks to drop the
noqa: PLR0911 return-count suppression, names the magic constant in
test_image_data instead of noqa: PLR2004, and hoists the CancelledError
raise out of the try block in test_timeout_behavior to satisfy
TRY301 without a noqa. Left the PERF203/BLE001 noqas in place where
they mark deliberate control-flow and callback-contract exceptions.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

Comment thread tests/client/test_athena_client.py Dismissed
@tcarroll-kroll
tcarroll-kroll enabled auto-merge (squash) August 24, 2026 11:51

@corpo-iwillspeak corpo-iwillspeak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

3 participants