1
1
import sys
2
- from _typeshed import ExcInfo
2
+ from _typeshed import ExcInfo , TraceFunction
3
3
from collections .abc import Callable , Iterable , Mapping
4
4
from types import CodeType , FrameType , TracebackType
5
5
from typing import IO , Any , SupportsInt , TypeVar
6
- from typing_extensions import Literal , ParamSpec , TypeAlias
6
+ from typing_extensions import Literal , ParamSpec
7
7
8
8
__all__ = ["BdbQuit" , "Bdb" , "Breakpoint" ]
9
9
10
10
_T = TypeVar ("_T" )
11
11
_P = ParamSpec ("_P" )
12
- _TraceDispatch : TypeAlias = Callable [[FrameType , str , Any ], Any ] # TODO: Recursive type
13
12
14
13
GENERATOR_AND_COROUTINE_FLAGS : Literal [672 ]
15
14
@@ -28,11 +27,11 @@ class Bdb:
28
27
def __init__ (self , skip : Iterable [str ] | None = ...) -> None : ...
29
28
def canonic (self , filename : str ) -> str : ...
30
29
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 : ...
36
35
def is_skipped_module (self , module_name : str ) -> bool : ...
37
36
def stop_here (self , frame : FrameType ) -> bool : ...
38
37
def break_here (self , frame : FrameType ) -> bool : ...
0 commit comments