chore: fix ruff violations F841, F811, E741 in main.py#394
chore: fix ruff violations F841, F811, E741 in main.py#394
Conversation
|
Merging to
|
Co-authored-by: abhimehro <84992105+abhimehro@users.noreply.github.com>
Co-authored-by: abhimehro <84992105+abhimehro@users.noreply.github.com>
|
👋 Development Partner is reviewing this PR. Will provide feedback shortly. |
There was a problem hiding this comment.
Pull request overview
Cleans up ruff-reported lint issues in main.py (unused exception binding and duplicate function definition) and updates the Python dependency lockfile to reflect dev dependencies.
Changes:
- Remove unused exception binding in
_gh_get(except httpx.HTTPStatusError as e→except httpx.HTTPStatusError). - Delete the duplicate (shadowing)
print_summary_tabledefinition near the entry-point section. - Update
uv.lockto includepytest-benchmark(and transitivepy-cpuinfo) under dev dependencies.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
main.py |
Fixes ruff violations by removing an unused exception binding and deleting a duplicate dead-code function definition. |
uv.lock |
Brings the lockfile in sync with dev dependencies by adding pytest-benchmark and py-cpuinfo. |
|
|
||
| except httpx.HTTPStatusError as e: | ||
| except httpx.HTTPStatusError: | ||
| # Re-raise with original exception (don't catch and re-raise) |
There was a problem hiding this comment.
This comment is contradictory: it says “don't catch and re-raise”, but the code is explicitly catching HTTPStatusError and re-raising it. Consider rewording to clarify the intent (e.g., that the exception is intentionally propagated unchanged / without wrapping).
| # Re-raise with original exception (don't catch and re-raise) | |
| # Intentionally propagate HTTPStatusError unchanged (no wrapping or swallowing) |
|
Closing: merge conflicts + subsumed by #396 dead-code removal. |
Three ruff-detected code quality violations in
main.pythat were flagged by the automated code quality agent.Changes
F841 — Drop unused binding
efrom a bare-reraise handler:F811 + E741 — Remove the second, never-called
print_summary_tabledefinition (formerly ~lines 2358–2397). It shadowed the primary definition at line 316 and was dead code — the summary table is rendered inline inmain(). The removed block also contained an inner helperdef line(l, m, r)whoselparameter triggered E741 (ambiguous name, visually indistinguishable from1).Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.