mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-20 02:41:16 +08:00
mailbox, mimetypes, unittest, zipfile: stubtest fixes (#5239)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user