Add several Python 3.8 annotations (#3347)

This commit is contained in:
Sebastian Rittau
2019-10-12 19:36:56 +02:00
committed by GitHub
parent 8ec25708d9
commit 62bbdf856c
11 changed files with 115 additions and 32 deletions

View File

@@ -1,6 +1,7 @@
# Stubs for gc
from typing import Any, Dict, List, Tuple
import sys
from typing import Any, Dict, List, Optional, Tuple
DEBUG_COLLECTABLE: int
@@ -16,7 +17,10 @@ def disable() -> None: ...
def enable() -> None: ...
def get_count() -> Tuple[int, int, int]: ...
def get_debug() -> int: ...
def get_objects() -> List[Any]: ...
if sys.version_info >= (3, 8):
def get_objects(generation: Optional[int] = ...) -> List[Any]: ...
else:
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]]: ...