mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
is_tarfile accepts pathlike (#3804)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user