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

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

No files matched your search

+2 -1
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: