Skip to content

Commit 48b271c

Browse files
committed
Update stub for builtin open function due to PEP-519.
1 parent 295788b commit 48b271c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎stdlib/3/builtins.pyi‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,8 @@ def next(i: Iterator[_T], default: _VT) -> Union[_T, _VT]: ...
795795
def oct(i: int) -> str: ... # TODO __index__
796796

797797
if sys.version_info >= (3, 6):
798-
from pathlib import Path
799-
def open(file: Union[str, bytes, int, Path], mode: str = 'r', buffering: int = -1, encoding: str = None,
798+
from os import PathLike
799+
def open(file: Union[str, bytes, int, PathLike], mode: str = 'r', buffering: int = -1, encoding: str = None,
800800
errors: str = None, newline: str = None, closefd: bool = ...) -> IO[Any]: ...
801801
else:
802802
def open(file: Union[str, bytes, int], mode: str = 'r', buffering: int = -1, encoding: str = None,

0 commit comments

Comments
 (0)