Skip to content

Avoid warning about unreachable things multiple times with --check-unreachable - #21839

Open
A5rocks wants to merge 1 commit into
python:masterfrom
A5rocks:dont-warn-twice
Open

Avoid warning about unreachable things multiple times with --check-unreachable#21839
A5rocks wants to merge 1 commit into
python:masterfrom
A5rocks:dont-warn-twice

Conversation

@A5rocks

@A5rocks A5rocks commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Refs #21835

On master, this is the case:

if False:
    if False:  # E: Statement is unreachable
        "not flagged!"  # E: Statement is unreachable

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

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.

1 participant