Closed
Description
I noticed that the following code fails when checked by mypy under Python 3.6:
import os
from pathlib import Path
fd = os.open(Path('/dev/null'), os.O_RDONLY)
The following error is produced:
error: Type argument 1 of "open" has incompatible value "Path"
However, the code seems to work fine due to Python 3.6's support for PEP 519.
If this is a problem with the type stubs then I could try submitting a PR. mypy rocks!
Metadata
Metadata
Assignees
Labels
No labels