Resolve ruff lint findings without noqa suppressions - #145
Open
tcarroll-kroll wants to merge 3 commits into
Open
Resolve ruff lint findings without noqa suppressions#145tcarroll-kroll wants to merge 3 commits into
tcarroll-kroll wants to merge 3 commits into
Conversation
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.
There was a problem hiding this comment.
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.
tcarroll-kroll
enabled auto-merge (squash)
August 24, 2026 11:51
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.
Summary
WorkerBatcherOptionsdataclass, dropping thenoqa: PLR0913suppression on its constructordetect_image_formatas a table of magic-number checks, dropping thenoqa: PLR0911suppressiontest_image_data.pyinstead ofnoqa: PLR2004CancelledErrorraise out of the try block intest_timeout_behavior.pyto satisfyTRY301without a noqaPERF203/BLE001noqas in place — they mark deliberate control-flow and gRPC callback-contract exceptionsCPY001(copyright header) in ruff config, needed as a prerequisite for the lint fixes to pass the repo's pre-commit hooksTest plan
ruff check .passes cleanuv run pytest -q -m "not functional and not e2e and not soak"— 165 passed