-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
stubs: false positiveType checkers report false errorsType checkers report false errors
Description
bug.py
:
"""Demo mypy bug."""
import filecmp
from pathlib import Path
d = Path.home()
filecmp.cmpfiles(d, d, d.glob("*"))
mypy bug.py
:
bug.py:6: error: Value of type variable "AnyStr" of "cmpfiles" cannot be "Path"
Found 1 error in 1 file (checked 1 source file)
I guess common
should be Iterable[AnyStr | PathLike[AnyStr]]
:
Lines 16 to 18 in 7bc9c16
def cmpfiles( | |
a: AnyStr | PathLike[AnyStr], b: AnyStr | PathLike[AnyStr], common: Iterable[AnyStr], shallow: int | bool = ... | |
) -> tuple[list[AnyStr], list[AnyStr], list[AnyStr]]: ... |
Metadata
Metadata
Assignees
Labels
stubs: false positiveType checkers report false errorsType checkers report false errors