-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrongtopic-pep-604PEP 604 (union | operator)PEP 604 (union | operator)topic-runtime-semanticsmypy doesn't model runtime semantics correctlymypy doesn't model runtime semantics correctlytopic-type-aliasTypeAlias and other type alias issuesTypeAlias and other type alias issues
Description
Foo = int | str
foo: object
isinstance(foo, Foo) # error
isinstance(foo, int | str) # no error
https://mypy-play.net/?mypy=master&python=3.10&gist=da37bef9ace54d59c18631a0a9f5bef2
KotlinIsland, airallergy, Jasha10, SemMulder, exoriente and 13 more
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongtopic-pep-604PEP 604 (union | operator)PEP 604 (union | operator)topic-runtime-semanticsmypy doesn't model runtime semantics correctlymypy doesn't model runtime semantics correctlytopic-type-aliasTypeAlias and other type alias issuesTypeAlias and other type alias issues