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,33 +1,27 @@
"""Stub file for the 'gc' 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 gc (Python 2)
from typing import Any, List, Tuple, Dict, GenericType
def collect(*args, **kwargs) -> int:
raise ValueError()
def disable() -> None: ...
from typing import List, Any, Tuple
def enable() -> None: ...
def get_count() -> tuple: ...
def get_debug() -> int: ...
def get_objects() -> list: ...
def get_referents(*args, **kwargs) -> list: ...
def get_referrers(*args, **kwargs) -> list: ...
def get_threshold() -> tuple: ...
def is_tracked(*args, **kwargs) -> bool: ...
def disable() -> None: ...
def isenabled() -> bool: ...
def collect(generation: int = None) -> int: ...
def set_debug(flags: int) -> None: ...
def get_debug() -> int: ...
def get_objects() -> List[Any]: ...
def set_threshold(threshold0: int, threshold1: int = None, threshold2: int = None) -> None: ...
def get_count() -> Tuple[int, int, int]: ...
def get_threshold() -> Tuple[int, int, int]: ...
def get_referrers(*objs: Any) -> List[Any]: ...
def get_referents(*objs: Any) -> List[Any]: ...
def is_tracked(obj: Any) -> bool: ...
def set_debug(a: int) -> None: ...
garbage = ... # type: List[Any]
def set_threshold(a: int, *args, **kwargs) -> None: ...
DEBUG_STATS = ... # type: Any
DEBUG_COLLECTABLE = ... # type: Any
DEBUG_UNCOLLECTABLE = ... # type: Any
DEBUG_INSTANCES = ... # type: Any
DEBUG_OBJECTS = ... # type: Any
DEBUG_SAVEALL = ... # type: Any
DEBUG_LEAK = ... # type: Any