mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
Merge zlib into 2and3 (#1130)
* Fix types and merge zlib.pyi * Move zlib into 2and3
This commit is contained in:
committed by
Matthias Kramm
parent
7027c3e4e8
commit
bc2234dba2
@@ -1,42 +0,0 @@
|
||||
# Stubs for zlib (Python 2.7)
|
||||
|
||||
DEFLATED = ... # type: int
|
||||
DEF_MEM_LEVEL = ... # type: int
|
||||
MAX_WBITS = ... # type: int
|
||||
ZLIB_VERSION = ... # type: str
|
||||
Z_BEST_COMPRESSION = ... # type: int
|
||||
Z_BEST_SPEED = ... # type: int
|
||||
Z_DEFAULT_COMPRESSION = ... # type: int
|
||||
Z_DEFAULT_STRATEGY = ... # type: int
|
||||
Z_FILTERED = ... # type: int
|
||||
Z_FINISH = ... # type: int
|
||||
Z_FULL_FLUSH = ... # type: int
|
||||
Z_HUFFMAN_ONLY = ... # type: int
|
||||
Z_NO_FLUSH = ... # type: int
|
||||
Z_SYNC_FLUSH = ... # type: int
|
||||
|
||||
|
||||
class error(Exception): ...
|
||||
|
||||
|
||||
class Compress:
|
||||
def compress(self, data: str) -> str: ...
|
||||
def flush(self) -> str: ...
|
||||
def copy(self) -> "Compress": ...
|
||||
|
||||
|
||||
class Decompress:
|
||||
unused_data = ... # type: str
|
||||
unconsumed_tail = ... # type: str
|
||||
def decompress(self, data: str, max_length: int = ...) -> str: ...
|
||||
def flush(self) -> str: ...
|
||||
def copy(self) -> "Decompress": ...
|
||||
|
||||
|
||||
def adler32(data: str, value: int = ...) -> int: ...
|
||||
def compress(data: str, level: int = ...) -> str: ...
|
||||
def compressobj(level: int = ..., method: int = ..., wbits: int = ...,
|
||||
memlevel: int = ..., strategy: int = ...) -> Compress: ...
|
||||
def crc32(data: str, value: int = ...) -> int: ...
|
||||
def decompress(data: str, wbits: int = ..., bufsize: int = ...) -> str: ...
|
||||
def decompressobj(wbits: int = ...) -> Decompress: ...
|
||||
@@ -1,10 +1,9 @@
|
||||
# Stubs for zlib
|
||||
import sys
|
||||
|
||||
DEFLATED = ... # type: int
|
||||
DEF_BUF_SIZE = ... # type: int
|
||||
DEF_MEM_LEVEL = ... # type: int
|
||||
MAX_WBITS = ... # type: int
|
||||
ZLIB_RUNTIME_VERSION = ... # type: str
|
||||
ZLIB_VERSION = ... # type: str
|
||||
Z_BEST_COMPRESSION = ... # type: int
|
||||
Z_BEST_SPEED = ... # type: int
|
||||
@@ -16,7 +15,9 @@ Z_FULL_FLUSH = ... # type: int
|
||||
Z_HUFFMAN_ONLY = ... # type: int
|
||||
Z_NO_FLUSH = ... # type: int
|
||||
Z_SYNC_FLUSH = ... # type: int
|
||||
|
||||
if sys.version_info >= (3,):
|
||||
DEF_BUF_SIZE = ... # type: int
|
||||
ZLIB_RUNTIME_VERSION = ... # type: str
|
||||
|
||||
class error(Exception): ...
|
||||
|
||||
@@ -30,7 +31,8 @@ class Compress:
|
||||
class Decompress:
|
||||
unused_data = ... # type: bytes
|
||||
unconsumed_tail = ... # type: bytes
|
||||
eof = ... # type: bool
|
||||
if sys.version_info >= (3,):
|
||||
eof = ... # type: bool
|
||||
def decompress(self, data: bytes, max_length: int = ...) -> bytes: ...
|
||||
def flush(self, length: int = ...) -> bytes: ...
|
||||
def copy(self) -> "Decompress": ...
|
||||
@@ -38,9 +40,16 @@ class Decompress:
|
||||
|
||||
def adler32(data: bytes, value: int = ...) -> int: ...
|
||||
def compress(data: bytes, level: int = ...) -> bytes: ...
|
||||
def compressobj(level: int = ..., method: int = ..., wbits: int = ...,
|
||||
memlevel: int = ..., strategy: int = ...,
|
||||
zdict: bytes = ...) -> Compress: ...
|
||||
if sys.version_info >= (3,):
|
||||
def compressobj(level: int = ..., method: int = ..., wbits: int = ...,
|
||||
memLevel: int = ..., strategy: int = ...,
|
||||
zdict: bytes = ...) -> Compress: ...
|
||||
else:
|
||||
def compressobj(level: int = ..., method: int = ..., wbits: int = ...,
|
||||
memlevel: int = ..., strategy: int = ...) -> Compress: ...
|
||||
def crc32(data: bytes, value: int = ...) -> int: ...
|
||||
def decompress(data: bytes, wbits: int = ..., bufsize: int = ...) -> bytes: ...
|
||||
def decompressobj(wbits: int = ..., zdict: bytes = ...) -> Decompress: ...
|
||||
if sys.version_info >= (3,):
|
||||
def decompressobj(wbits: int = ..., zdict: bytes = ...) -> Decompress: ...
|
||||
else:
|
||||
def decompressobj(wbits: int = ...) -> Decompress: ...
|
||||
Reference in New Issue
Block a user