Closed
Description
input
from collections.abc import Callable
def f(): pass
print(isinstance(f, Callable))
output
$ mypy t.py
t.py:5: error: Argument 2 to "isinstance" has incompatible type "_SpecialForm"; expected "Union[type, Tuple[Union[type, Tuple[Any, ...]], ...]]"
$ mypy --version
mypy 0.701
fix (for me)
the fix for me is to just use callable(...)
, however in some cases this wasn't possible and so for now I'm # type: ignore
ing