pathlib: update for py310 (#6225)

This commit is contained in:
Shantanu
2021-11-02 20:23:30 -07:00
committed by GitHub
parent 3d5f35c33b
commit 38ab20926f

View File

@@ -68,8 +68,12 @@ class Path(PurePath):
) -> bool | None: ...
@classmethod
def cwd(cls: Type[_P]) -> _P: ...
def stat(self) -> stat_result: ...
def chmod(self, mode: int) -> None: ...
if sys.version_info >= (3, 10):
def stat(self, *, follow_symlinks: bool = ...) -> stat_result: ...
def chmod(self, mode: int, *, follow_symlinks: bool = ...) -> None: ...
else:
def stat(self) -> stat_result: ...
def chmod(self, mode: int) -> None: ...
def exists(self) -> bool: ...
def glob(self: _P, pattern: str) -> Generator[_P, None, None]: ...
def group(self) -> str: ...
@@ -154,6 +158,8 @@ class Path(PurePath):
def rglob(self: _P, pattern: str) -> Generator[_P, None, None]: ...
def rmdir(self) -> None: ...
def symlink_to(self, target: str | Path, target_is_directory: bool = ...) -> None: ...
if sys.version_info >= (3, 10):
def hardlink_to(self, target: str | Path) -> None: ...
def touch(self, mode: int = ..., exist_ok: bool = ...) -> None: ...
if sys.version_info >= (3, 8):
def unlink(self, missing_ok: bool = ...) -> None: ...