Closed
Description
Updating mypy to the latest (0.870) version I got it complaining about the following code:
import os
path = "/tmp"
for call in [os.path.exists, os.path.isdir]:
assert(call(path))
test.py:3: error: List item 0 has incompatible type "Callable[[Union[AnyStr, _PathLike[AnyStr]]], bool]"; expected "Callable[[_PathLike[AnyStr]], bool]"
test.py:4: error: Argument 1 has incompatible type "str"; expected "_PathLike[AnyStr]"
0.770 version is happy with it.
Is this an expected behavior, or a bug?
If it is expected - what's the proper way to make the latest mypy happy?