mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Use Literal type and improve callbacks in gc (#6950)
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
import sys
|
||||
from typing import Any
|
||||
from typing import Any, Callable
|
||||
from typing_extensions import Literal
|
||||
|
||||
DEBUG_COLLECTABLE: int
|
||||
DEBUG_LEAK: int
|
||||
DEBUG_SAVEALL: int
|
||||
DEBUG_STATS: int
|
||||
DEBUG_UNCOLLECTABLE: int
|
||||
callbacks: list[Any]
|
||||
DEBUG_COLLECTABLE: Literal[2]
|
||||
DEBUG_LEAK: Literal[38]
|
||||
DEBUG_SAVEALL: Literal[32]
|
||||
DEBUG_STATS: Literal[1]
|
||||
DEBUG_UNCOLLECTABLE: Literal[4]
|
||||
|
||||
_CallbackType = Callable[[Literal["start", "stop"], dict[str, int]], object]
|
||||
|
||||
callbacks: list[_CallbackType]
|
||||
garbage: list[Any]
|
||||
|
||||
def collect(generation: int = ...) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user