is_tarfile accepts pathlike (#3804)

This commit is contained in:
Batuhan Taskaya
2020-05-27 18:21:55 +03:00
committed by GitHub
parent e49c156d92
commit 53ede5967b

View File

@@ -177,7 +177,10 @@ class TarFile(Iterable[TarInfo]):
fileobj: Optional[IO[bytes]] = ...) -> TarInfo: ...
def close(self) -> None: ...
def is_tarfile(name: str) -> bool: ...
if sys.version_info >= (3, 9):
def is_tarfile(name: Union[_Path, IO[bytes]]) -> bool: ...
else:
def is_tarfile(name: _Path) -> bool: ...
if sys.version_info < (3, 8):
def filemode(mode: int) -> str: ... # undocumented