mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-07 12:44:33 +08:00
is_tarfile accepts pathlike (#3804)
This commit is contained in:
1 parent
e49c156d92
commit
53ede5967b
1 file changed
+4
-1
@@ -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