mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-03 01:53:24 +08:00
committed by
Jelle Zijlstra
parent
aae01b8de0
commit
4770059894
@@ -8,7 +8,7 @@ import sys
|
||||
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
_Path = Union[os.PathLike[Text], Text]
|
||||
_Path = Union[os.PathLike[str], str]
|
||||
else:
|
||||
_Path = Text
|
||||
_SZI = Union[Text, ZipInfo]
|
||||
@@ -51,8 +51,30 @@ class ZipFile:
|
||||
fp: IO[bytes]
|
||||
NameToInfo: Dict[Text, ZipInfo]
|
||||
start_dir: int # undocumented
|
||||
def __init__(self, file: Union[_Path, IO[bytes]], mode: Text = ..., compression: int = ...,
|
||||
allowZip64: bool = ...) -> None: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def __init__(
|
||||
self,
|
||||
file: Union[_Path, IO[bytes]],
|
||||
mode: Text = ...,
|
||||
compression: int = ...,
|
||||
allowZip64: bool = ...,
|
||||
compresslevel: Optional[int] = ...,
|
||||
*,
|
||||
strict_timestamps: bool = ...,
|
||||
) -> None: ...
|
||||
elif sys.version_info >= (3, 7):
|
||||
def __init__(
|
||||
self,
|
||||
file: Union[_Path, IO[bytes]],
|
||||
mode: Text = ...,
|
||||
compression: int = ...,
|
||||
allowZip64: bool = ...,
|
||||
compresslevel: Optional[int] = ...,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self, file: Union[_Path, IO[bytes]], mode: Text = ..., compression: int = ..., allowZip64: bool = ...,
|
||||
) -> None: ...
|
||||
def __enter__(self) -> ZipFile: ...
|
||||
def __exit__(self, exc_type: Optional[Type[BaseException]],
|
||||
exc_val: Optional[BaseException],
|
||||
|
||||
Reference in New Issue
Block a user