Skip to content

Ignore await and typing ellipsis as non-effectful statements - #22291

Draft
maxfischer2781 wants to merge 7 commits into
github:mainfrom
maxfischer2781:python/stmt_effects_async_stub
Draft

Ignore await and typing ellipsis as non-effectful statements#22291
maxfischer2781 wants to merge 7 commits into
github:mainfrom
maxfischer2781:python/stmt_effects_async_stub

Conversation

@maxfischer2781

@maxfischer2781 maxfischer2781 commented Aug 6, 2026

Copy link
Copy Markdown

This PR extends the Python StatementNoEffect query to ignore await and typing ellipses expression statements.

The Protocol checl covers indirect subclasses of Protocol but currently misses generic Protocols (e.g. class Foo(Protocol[Bar])). The former should already eliminate many false positives, but the latter needs more investigation from my side - I might provide cover this in a later PR if it turns out to be too complicated.

@github-actions github-actions Bot added the Python label Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False positive – "Statement has no effect" for Python type hint ellipsis LGTM.com - false positive "Statement has no effect" for Python await

1 participant