diff --git a/stdlib/2.7/gc.pyi b/stdlib/2.7/gc.pyi index f5728d9a3..74dc44570 100644 --- a/stdlib/2.7/gc.pyi +++ b/stdlib/2.7/gc.pyi @@ -1,6 +1,7 @@ -"""Stubs for the 'gc' module.""" +# Stubs for gc + +from typing import Any, List, Tuple -from typing import List, Any, Tuple def enable() -> None: ... def disable() -> None: ... @@ -9,7 +10,8 @@ def collect(generation: int = ...) -> int: ... def set_debug(flags: int) -> None: ... def get_debug() -> int: ... def get_objects() -> List[Any]: ... -def set_threshold(threshold0: int, threshold1: int = ..., threshold2: int = ...) -> None: ... +def set_threshold(threshold0: int, threshold1: int = ..., + threshold2: int = ...) -> None: ... def get_count() -> Tuple[int, int, int]: ... def get_threshold() -> Tuple[int, int, int]: ... def get_referrers(*objs: Any) -> List[Any]: ... @@ -18,10 +20,10 @@ def is_tracked(obj: Any) -> bool: ... garbage = ... # type: List[Any] -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 +DEBUG_STATS = ... # type: int +DEBUG_COLLECTABLE = ... # type: int +DEBUG_UNCOLLECTABLE = ... # type: int +DEBUG_INSTANCES = ... # type: int +DEBUG_OBJECTS = ... # type: int +DEBUG_SAVEALL = ... # type: int +DEBUG_LEAK = ... # type: int diff --git a/stdlib/3/gc.pyi b/stdlib/3/gc.pyi index 7f45cdb36..4d00dbe0f 100644 --- a/stdlib/3/gc.pyi +++ b/stdlib/3/gc.pyi @@ -1,10 +1,28 @@ # Stubs for gc -# NOTE: These are incomplete! +from typing import Any, List, Tuple -import typing -def collect(generation: int = ...) -> int: ... +DEBUG_COLLECTABLE = ... # type: int +DEBUG_LEAK = ... # type: int +DEBUG_SAVEALL = ... # type: int +DEBUG_STATS = ... # type: int +DEBUG_UNCOLLECTABLE = ... # type: int +callbacks = ... # type: List[Any] +garbage = ... # type: List[Any] + +def collect(generations: int = ...) -> int: ... def disable() -> None: ... def enable() -> None: ... +def get_count() -> Tuple[int, int, int]: ... +def get_debug() -> int: ... +def get_objects() -> List[Any]: ... +def get_referents(*objs: Any) -> List[Any]: ... +def get_referrers(*objs: Any) -> List[Any]: ... +def get_stats() -> List[Dict[str, Any]]: ... +def get_threshold() -> Tuple[int, int, int]: ... +def is_tracked(obj: Any) -> bool: ... def isenabled() -> bool: ... +def set_debug(flags: int) -> None: ... +def set_threshold(threshold0: int, threshold1: int = ..., + threshold2: int = ...) -> None: ...