Skip to content

Warn about always true/false isinstance tests #2395

Closed
@JukkaL

Description

@JukkaL

These may result in code that mypy considers unreachable and silently doesn't type check. However, they may happen quite frequently in innocent things like assert isinstance(x, str) so finding a good heuristic for what to report can be tricky.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions