Format: application/octet-stream
⬇ Download File (1.1 KB)
   1  import sys
   2  from typing import Any, Dict, List, Optional, Tuple
   3  
   4  DEBUG_COLLECTABLE: int
   5  DEBUG_LEAK: int
   6  DEBUG_SAVEALL: int
   7  DEBUG_STATS: int
   8  DEBUG_UNCOLLECTABLE: int
   9  callbacks: List[Any]
  10  garbage: List[Any]
  11  
  12  def collect(generation: int = ...) -> int: ...
  13  def disable() -> None: ...
  14  def enable() -> None: ...
  15  def get_count() -> Tuple[int, int, int]: ...
  16  def get_debug() -> int: ...
  17  
  18  if sys.version_info >= (3, 8):
  19      def get_objects(generation: Optional[int] = ...) -> List[Any]: ...
  20  
  21  else:
  22      def get_objects() -> List[Any]: ...
  23  
  24  if sys.version_info >= (3, 7):
  25      def freeze() -> None: ...
  26      def unfreeze() -> None: ...
  27      def get_freeze_count() -> int: ...
  28  
  29  def get_referents(*objs: Any) -> List[Any]: ...
  30  def get_referrers(*objs: Any) -> List[Any]: ...
  31  def get_stats() -> List[Dict[str, Any]]: ...
  32  def get_threshold() -> Tuple[int, int, int]: ...
  33  def is_tracked(__obj: Any) -> bool: ...
  34  
  35  if sys.version_info >= (3, 9):
  36      def is_finalized(__obj: Any) -> bool: ...
  37  
  38  def isenabled() -> bool: ...
  39  def set_debug(__flags: int) -> None: ...
  40  def set_threshold(threshold0: int, threshold1: int = ..., threshold2: int = ...) -> None: ...
  41