False negative in isinstance(var, x)
when x
have x.__instancecheck__
#13063
Labels
bug
mypy got something wrong
isinstance(var, x)
when x
have x.__instancecheck__
#13063
Expected Behavior
No errors. First
reveal_type
should reveal(I honestly don't know what should be here, maybe "x" or something like "InstanceOf[X]"?)
, second -Any
Actual Behavior
Argument 2 to "isinstance" has incompatible type "X"; expected "Union[huge union]"
error. Bothreveal_type
's revealsAny
At runtime i get no error.
My Environment
mypy 0.961 (compiled: no)
CPython 3.10.4
The text was updated successfully, but these errors were encountered: