Repository navigation
sweep(codeql): tranche 2 — dual imports, assert side effects, lambdas, excepts, unused bindings - #548
Merged
Merged
Conversation
…, excepts, unused bindings
import-and-import-from x11: every function-local 'import a.b as m'
paired with a module-level from-import now uses the from-form
('from a import b as m').
side-effect-in-assert x21: every 'assert <mutating call> is/== X'
split into 'result = <call>; assert result ...' (plus the
Project.open variant hoisted to a variable).
unnecessary-lambda x7: 'lambda: Ctor()' -> 'Ctor' (identical factory
semantics: calling the class constructs).
unused-import x4 (OpEngine seam import -> comment; spike sys; vendored
math), empty-except x1 (logged), catch-base-exception x1 (Exception),
unreachable x1 (transnet print condition), unused-global-variable x3
(zero-reference module bindings only — the other 26 flagged bindings
are referenced elsewhere and stay; measured by repo-wide grep).
Verified: basedpyright 0 errors; FULL sidecar pytest 7792 passed,
2 skipped.
owner-directed automation; --admin documented
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Second tranche of the cs=335 sweep — ~47 more alerts by code:
Verification:
basedpyright→ 0 errors; full sidecar suitepython -m pytest -q→ 7792 passed, 2 skipped.Remaining (tracked for tranche 3): py/unused-global-variable ×26 (referenced module surface — needs an import/export decision), batch.py multiple-definition, test_jobs mixed-returns (repo comment forbids the obvious fix), vendored _vinet_s polluting-import/mixed-returns, teardown_residual ×2, js ×2.
owner-directed automation; --admin documented