11import sys
2- from _typeshed import ExcInfo
2+ from _typeshed import ExcInfo , TraceFunction
33from collections .abc import Callable , Iterable , Mapping
44from types import CodeType , FrameType , TracebackType
55from typing import IO , Any , SupportsInt , TypeVar
6- from typing_extensions import Literal , ParamSpec , TypeAlias
6+ from typing_extensions import Literal , ParamSpec
77
88__all__ = ["BdbQuit" , "Bdb" , "Breakpoint" ]
99
1010_T = TypeVar ("_T" )
1111_P = ParamSpec ("_P" )
12- _TraceDispatch : TypeAlias = Callable [[FrameType , str , Any ], Any ] # TODO: Recursive type
1312
1413GENERATOR_AND_COROUTINE_FLAGS : Literal [672 ]
1514
@@ -28,11 +27,11 @@ class Bdb:
2827 def __init__ (self , skip : Iterable [str ] | None = ...) -> None : ...
2928 def canonic (self , filename : str ) -> str : ...
3029 def reset (self ) -> None : ...
31- def trace_dispatch (self , frame : FrameType , event : str , arg : Any ) -> _TraceDispatch : ...
32- def dispatch_line (self , frame : FrameType ) -> _TraceDispatch : ...
33- def dispatch_call (self , frame : FrameType , arg : None ) -> _TraceDispatch : ...
34- def dispatch_return (self , frame : FrameType , arg : Any ) -> _TraceDispatch : ...
35- def dispatch_exception (self , frame : FrameType , arg : ExcInfo ) -> _TraceDispatch : ...
30+ def trace_dispatch (self , frame : FrameType , event : str , arg : Any ) -> TraceFunction : ...
31+ def dispatch_line (self , frame : FrameType ) -> TraceFunction : ...
32+ def dispatch_call (self , frame : FrameType , arg : None ) -> TraceFunction : ...
33+ def dispatch_return (self , frame : FrameType , arg : Any ) -> TraceFunction : ...
34+ def dispatch_exception (self , frame : FrameType , arg : ExcInfo ) -> TraceFunction : ...
3635 def is_skipped_module (self , module_name : str ) -> bool : ...
3736 def stop_here (self , frame : FrameType ) -> bool : ...
3837 def break_here (self , frame : FrameType ) -> bool : ...
0 commit comments