zipfile: fix ZipExtFile parameter (#3616)

This was changed in bpo-38334 and backported to Python 3.7.6 and 3.8.1.
This commit is contained in:
Shantanu
2020-01-16 00:03:39 -08:00
committed by Sebastian Rittau
parent 42d68dd765
commit 375e8c1127

View File

@@ -36,14 +36,24 @@ class ZipExtFile(io.BufferedIOBase):
newlines: Optional[List[bytes]]
mode: str
name: str
def __init__(
self,
fileobj: IO[bytes],
mode: str,
zipinfo: ZipInfo,
decrypter: Optional[Callable[[Sequence[int]], bytes]] = ...,
close_fileobj: bool = ...,
) -> None: ...
if sys.version_info >= (3, 7):
def __init__(
self,
fileobj: IO[bytes],
mode: str,
zipinfo: ZipInfo,
pwd: Optional[bytes] = ...,
close_fileobj: bool = ...,
) -> None: ...
else:
def __init__(
self,
fileobj: IO[bytes],
mode: str,
zipinfo: ZipInfo,
decrypter: Optional[Callable[[Sequence[int]], bytes]] = ...,
close_fileobj: bool = ...,
) -> None: ...
def __repr__(self) -> str: ...
def peek(self, n: int = ...) -> bytes: ...
def read1(self, n: Optional[int]) -> bytes: ... # type: ignore