Add return type for pathlib.Path.replace on Python >= 3.8 (#3936)

This commit is contained in:
Brian Turek
2020-04-22 00:52:33 +01:00
committed by GitHub
parent ec57251010
commit 6e9e059f0c
2 changed files with 4 additions and 2 deletions

View File

@@ -99,9 +99,10 @@ class Path(PurePath):
def owner(self) -> str: ...
if sys.version_info >= (3, 8):
def rename(self: _P, target: Union[str, PurePath]) -> _P: ...
def replace(self: _P, target: Union[str, PurePath]) -> _P: ...
else:
def rename(self, target: Union[str, PurePath]) -> None: ...
def replace(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: ...
else: