8000 Regression: isinstance(x, AliasOfTuple) is not supported · Issue #3068 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content
Regression: isinstance(x, AliasOfTuple) is not supported #3068
Closed
@elazarg

Description

@elazarg

Example:

T = (int, int)
x : object
if isinstance(x, T):
    reveal_type(x)  # Revealed type is 'builtins.object'
    x + x  # E: Unsupported left operand type for + ("object")

This was introduced in #2995

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0