Skip to content

Is it sus that fake unreachable blocks aren't type checked? #11511

Closed
@KotlinIsland

Description

@KotlinIsland
def foo(i: float) -> None:
    if not isinstance(i, float):
        i.AMONGUS  # SUS ALERT!

foo(1)

AttributeError: 'int' object has no attribute 'AMONGUS'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions