You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
dchirikov
changed the title
List item 0 has incompatible type "Callable[[Union[AnyStr, _PathLike[AnyStr]]], bool]"; expected "Callable[[_PathLike[AnyStr]], bool]"
Weird behaviour of Union[] in 0.870
Jun 9, 2020
dchirikov
changed the title
Weird behaviour of Union[] in 0.870
Weird behaviour on os.path.* in 0.870
Jun 9, 2020
Uh oh!
There was an error while loading. Please reload this page.
Updating mypy to the latest (0.870) version I got it complaining about the following code:
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?
The text was updated successfully, but these errors were encountered: