tarfile.gettarinfo() accepts PathLike objects (#7832)

This method has accepted PathLike objects since Python 3.6
(https://github.com/python/cpython/pull/512)
This commit is contained in:
Adam Simpkins
2022-05-11 22:02:04 -07:00
committed by GitHub
parent f8db698ece
commit 40d6592ba1

View File

@@ -315,7 +315,9 @@ class TarFile:
) -> None: ...
def addfile(self, tarinfo: TarInfo, fileobj: IO[bytes] | None = ...) -> None: ...
def gettarinfo(self, name: str | None = ..., arcname: str | None = ..., fileobj: IO[bytes] | None = ...) -> TarInfo: ...
def gettarinfo(
self, name: StrOrBytesPath | None = ..., arcname: str | None = ..., fileobj: IO[bytes] | None = ...
) -> TarInfo: ...
def close(self) -> None: ...
if sys.version_info >= (3, 9):