(🎁) isinstance
/issubclass
only accept typing.Union
s of type
s, not other type forms
#12370
Labels
isinstance
/issubclass
only accept typing.Union
s of type
s, not other type forms
#12370
Until type forms are properly supported by the type system, I wonder if this could be special cased?
FYI mypy is incorrectly inferring this as a
types.UnionType
but it is actually atyping.Union
(#12369), I don't think you can have aUnionType
with type forms in it.PyCharm correctly warns here:
related: python/typeshed/issues/7505
The text was updated successfully, but these errors were encountered: