-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrongfalse-positivemypy gave an error on correct codemypy gave an error on correct codegood-first-issuepriority-1-normaltopic-union-types
Description
Mypy generates a false positive for this fragment:
from typing import Iterable, Container, Union
i: Iterable[str]
c: Container[str]
u: Union[Iterable[str], Container[str]]
'x' in i
'x' in c
'x' in u # Unsupported right operand type for in ("Union[Iterable[str], Container[str]]")
This should be easy to fix.
anshuman-goel, ruohola, GideonBear and fohrloop
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongfalse-positivemypy gave an error on correct codemypy gave an error on correct codegood-first-issuepriority-1-normaltopic-union-types