mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-10 13:32:26 +08:00
add zipfile for py2 (#345)
This commit is contained in:
committed by
Matthias Kramm
parent
932737d322
commit
8ef221c162
@@ -1,29 +0,0 @@
|
||||
# TODO these are incomplete
|
||||
|
||||
from typing import List, Tuple, BinaryIO, Union
|
||||
|
||||
ZIP_STORED = 0
|
||||
ZIP_DEFLATED = 0
|
||||
|
||||
def is_zipfile(filename: Union[str, BinaryIO]) -> bool: ...
|
||||
|
||||
class ZipInfo:
|
||||
filename = ... # type: str
|
||||
date_time = ... # type: Tuple[int, int, int, int, int, int]
|
||||
compressed_size = 0
|
||||
file_size = 0
|
||||
|
||||
class ZipFile:
|
||||
def __init__(self, file: Union[str, BinaryIO], mode: str = ...,
|
||||
compression: int = ...,
|
||||
allowZip64: bool = ...) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def getinfo(name: str) -> ZipInfo: ...
|
||||
def infolist(self) -> List[ZipInfo]: ...
|
||||
def namelist(self) -> List[str]: ...
|
||||
def read(self, name: Union[str, ZipInfo], pwd: str = ...) -> bytes: ...
|
||||
def write(self, filename: str, arcname: str = ...,
|
||||
compress_type: int = ...) -> None: ...
|
||||
|
||||
def __enter__(self) -> 'ZipFile': ...
|
||||
def __exit__(self, type, value, traceback) -> bool: ...
|
||||
Reference in New Issue
Block a user