Uh oh!
There was an error while loading. Please reload this page.
- 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
(Inspired from #2267)
Starting with Python 3.6, filecmp functions can handle path-like objects, including:
filecmp.cmp() filecmp.cmpfiles() filecmp.dircmp()Reproduction:
importfilecmpfrompathlibimportPathfilecmp.dircmp(Path("/tmp"), "/tmp") filecmp.cmp(Path("file1"), Path("file2"))Will output:
error: Valueof type variable"AnyStr"of"dircmp"cannotbe"Path"error: Argument1to"cmp"hasincompatibletype"Path"; expected"Union[bytes, str]"error: Argument2to"cmp"hasincompatibletype"Path"; expected"Union[bytes, str]"I will not have time to work on it, but I think it is a good thing to have a open issue for anyone wanting to give a hand.
Metadata
Metadata
Assignees
Labels
stubs: false positiveType checkers report false errorsType checkers report false errors