Improve several stubs. (math, _random, time, etc.)

Some of these are derived from mypy/stubs/.
This commit is contained in:
Matthias Kramm
2015-09-15 13:51:11 -07:00
parent 42afca768b
commit dd042b3255
10 changed files with 538 additions and 576 deletions

View File

@@ -1,31 +1,36 @@
"""Stub file for the 'zlib' module."""
# This is an autogenerated file. It serves as a starting point
# for a more precise manual annotation of this module.
# Feel free to edit the source below, but remove this header when you do.
# Stubs for zlib (Python 2.7)
from typing import Any, List, Tuple, Dict, GenericType
class error(Exception): ...
def adler32(a, *args, **kwargs) -> int: ...
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
def compress(a, *args, **kwargs) -> str:
raise MemoryError()
def adler32(data: str, value: int = ...) -> int: ...
def compress(data: str, level: int = ...) -> str: ...
def crc32(data: str, value: int = ...) -> int: ...
def decompress(data: str, wbits: int = ..., bufsize: int = ...) -> str: ...
def compressobj(*args, **kwargs) -> Any:
raise MemoryError()
raise ValueError()
class compressobj:
def __init__(level: int = ..., method: int = ..., wbits: int = ..., memlevel: int = ...,
strategy: int = ...): ...
def compress(self, data: str) -> str
def copy(self) -> _Compress
def flush(self) -> NoneType
def crc32(a, *args, **kwargs) -> int: ...
def decompress(a, *args, **kwargs) -> str:
raise MemoryError()
def decompressobj(*args, **kwargs) -> Any:
raise MemoryError()
raise ValueError()
class Compress(object):
pass
class Decompress(object):
pass
class decompressobj:
def __init__(wbits: int = ...): ...
def copy(self) -> _Compress
def decompress(self, data: str) -> str
def flush(self) -> NoneType