mailbox, mimetypes, unittest, zipfile: stubtest fixes (#5239)

This commit is contained in:
hatal175
2021-04-22 07:58:01 +03:00
committed by GitHub
parent 2686e20060
commit bf5ff49b53
6 changed files with 32 additions and 25 deletions

View File

@@ -186,6 +186,9 @@ class ZipInfo:
def is_dir(self) -> bool: ...
def FileHeader(self, zip64: Optional[bool] = ...) -> bytes: ...
class _PathOpenProtocol(Protocol):
def __call__(self, mode: str = ..., pwd: Optional[bytes] = ..., *, force_zip64: bool = ...) -> IO[bytes]: ...
if sys.version_info >= (3, 8):
class Path:
@property
@@ -193,7 +196,11 @@ if sys.version_info >= (3, 8):
@property
def parent(self) -> Path: ... # undocumented
def __init__(self, root: Union[ZipFile, StrPath, IO[bytes]], at: str = ...) -> None: ...
def open(self, mode: str = ..., pwd: Optional[bytes] = ..., *, force_zip64: bool = ...) -> IO[bytes]: ...
if sys.version_info >= (3, 9):
def open(self, mode: str = ..., pwd: Optional[bytes] = ..., *, force_zip64: bool = ...) -> IO[bytes]: ...
else:
@property
def open(self) -> _PathOpenProtocol: ...
def iterdir(self) -> Iterator[Path]: ...
def is_dir(self) -> bool: ...
def is_file(self) -> bool: ...