Skip to content

Resolve CodeQL ineffectual-statement findings in protocol method stubs - #1638

Draft
mmanela with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-quality-findings
Draft

Resolve CodeQL ineffectual-statement findings in protocol method stubs#1638
mmanela with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-quality-findings

Conversation

Copilot AI commented Jul 8, 2026

Copy link
Copy Markdown

This PR addresses the three requested code-quality findings (#5, #6, #7) by removing ineffectual expression statements in protocol method bodies. The update is limited to the flagged locations and preserves typing/protocol intent.

  • Scope

    • Updated only:
      • bowtie/_commands.py
      • bowtie/_core.py
  • Changes

    • Replaced ... expression statements in protocol method bodies with pass:
      • Command.to_request(...)
      • Command.from_response(...)
      • _MakeValidator.__call__(...)
  • Why this resolves the findings

    • ... as a bare expression is reported as py/ineffectual-statement; pass provides an explicit no-op body for protocol stubs without changing interface contracts.
class Command(Protocol[R]):
    def to_request(self, validate: Callable[..., None]) -> dict[str, Any]:
        pass

    @staticmethod
    def from_response(response: bytes, validate: Callable[..., None]) -> R | None:
        pass

Copilot AI changed the title [WIP] Fix code quality findings #7, #6, #5 Resolve CodeQL ineffectual-statement findings in protocol method stubs Jul 8, 2026
Copilot AI requested a review from mmanela July 8, 2026 19:27
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.

2 participants