Reflect Python 3.8 updates to the pathlib stdlib module (#3568)

This commit is contained in:
Jeppe Fihl-Pearson
2020-01-03 16:47:50 +00:00
committed by Jelle Zijlstra
parent f5a1925e76
commit fed3472e7c
2 changed files with 16 additions and 4 deletions

View File

@@ -95,7 +95,10 @@ class Path(PurePath):
encoding: Optional[str] = ..., errors: Optional[str] = ...,
newline: Optional[str] = ...) -> IO[Any]: ...
def owner(self) -> str: ...
def rename(self, target: Union[str, PurePath]) -> None: ...
if sys.version_info >= (3, 8):
def rename(self: _P, target: Union[str, PurePath]) -> _P: ...
else:
def rename(self, target: Union[str, PurePath]) -> None: ...
def replace(self, target: Union[str, PurePath]) -> None: ...
if sys.version_info < (3, 6):
def resolve(self: _P) -> _P: ...
@@ -106,7 +109,10 @@ class Path(PurePath):
def symlink_to(self, target: Union[str, Path],
target_is_directory: bool = ...) -> None: ...
def touch(self, mode: int = ..., exist_ok: bool = ...) -> None: ...
def unlink(self) -> None: ...
if sys.version_info >= (3, 8):
def unlink(self, missing_ok: bool = ...) -> None: ...
else:
def unlink(self) -> None: ...
if sys.version_info >= (3, 5):
@classmethod