mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 06:36:54 +08:00
Improve undocumented TarFile method type hints (#4056)
Add type hints for undocumented tarfile.TarFile file methods called via _extract_member() when extract() is called.
This commit is contained in:
@@ -144,6 +144,18 @@ class TarFile(Iterable[TarInfo]):
|
||||
path: _Path = ...) -> None: ...
|
||||
def extractfile(self,
|
||||
member: Union[str, TarInfo]) -> Optional[IO[bytes]]: ...
|
||||
def makedir(self, tarinfo: TarInfo, targetpath: _Path) -> None: ... # undocumented
|
||||
def makefile(self, tarinfo: TarInfo, targetpath: _Path) -> None: ... # undocumented
|
||||
def makeunknown(self, tarinfo: TarInfo, targetpath: _Path) -> None: ... # undocumented
|
||||
def makefifo(self, tarinfo: TarInfo, targetpath: _Path) -> None: ... # undocumented
|
||||
def makedev(self, tarinfo: TarInfo, targetpath: _Path) -> None: ... # undocumented
|
||||
def makelink(self, tarinfo: TarInfo, targetpath: _Path) -> None: ... # undocumented
|
||||
if sys.version_info >= (3, 5):
|
||||
def chown(self, tarinfo: TarInfo, targetpath: _Path, numeric_owner: bool) -> None: ... # undocumented
|
||||
else:
|
||||
def chown(self, tarinfo: TarInfo, targetpath: _Path) -> None: ... # undocumented
|
||||
def chmod(self, tarinfo: TarInfo, targetpath: _Path) -> None: ... # undocumented
|
||||
def utime(self, tarinfo: TarInfo, targetpath: _Path) -> None: ... # undocumented
|
||||
if sys.version_info >= (3, 7):
|
||||
def add(self, name: str, arcname: Optional[str] = ...,
|
||||
recursive: bool = ..., *,
|
||||
|
||||
Reference in New Issue
Block a user