Debian Codegraph @

jedi/third_party/typeshed/stdlib/gc.pyi

raw symbols SCIP
1 from collections.abc import Callable
2 from typing import Any, Final, Literal
3 from typing_extensions import TypeAlias
4
5 DEBUG_COLLECTABLE: Final = 2
6 DEBUG_LEAK: Final = 38
7 DEBUG_SAVEALL: Final = 32
8 DEBUG_STATS: Final = 1
9 DEBUG_UNCOLLECTABLE: Final = 4
10
11 _CallbackType: TypeAlias = Callable[[Literal["start", "stop"], dict[str, int]], object]
12
13 callbacks: list[_CallbackType]
14 garbage: list[Any]
15
16 def collect(generation: int = 2) -> int: ...
17 def disable() -> None: ...
18 def enable() -> None: ...
19 def get_count() -> tuple[int, int, int]: ...
20 def get_debug() -> int: ...
21 def get_objects(generation: int | None = None) -> list[Any]: ...
22 def freeze() -> None: ...
23 def unfreeze() -> None: ...
24 def get_freeze_count() -> int: ...
25 def get_referents(*objs: Any) -> list[Any]: ...
26 def get_referrers(*objs: Any) -> list[Any]: ...
27 def get_stats() -> list[dict[str, Any]]: ...
28 def get_threshold() -> tuple[int, int, int]: ...
29 def is_tracked(obj: Any, /) -> bool: ...
30 def is_finalized(obj: Any, /) -> bool: ...
31 def isenabled() -> bool: ...
32 def set_debug(flags: int, /) -> None: ...
33 def set_threshold(threshold0: int, threshold1: int = 0, threshold2: int = 0, /) -> None: ...