-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Union(Type) and TypeForm #21910
Copy link
Copy link
Open
Labels
bugmypy got something wrongmypy got something wrongtopic-runtime-semanticsmypy doesn't model runtime semantics correctlymypy doesn't model runtime semantics correctly
Description
Activity
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongtopic-runtime-semanticsmypy doesn't model runtime semantics correctlymypy doesn't model runtime semantics correctly
My function should analyze types.
Both when --warn-unreachable is enabled, and when checking typing.Union, and when checking types.UnionType, an error occurs.
code:
errors:
in runtime, the behavior of both
isinstanceis equivalent.