mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 08:04:24 +08:00
Add _typeshed.(Opt)ExcInfo (#7645)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from _typeshed import ExcInfo
|
||||
from types import CodeType, FrameType, TracebackType
|
||||
from typing import IO, Any, Callable, Iterable, Mapping, SupportsInt, TypeVar
|
||||
from typing_extensions import Literal, ParamSpec, TypeAlias
|
||||
@@ -7,14 +8,12 @@ __all__ = ["BdbQuit", "Bdb", "Breakpoint"]
|
||||
_T = TypeVar("_T")
|
||||
_P = ParamSpec("_P")
|
||||
_TraceDispatch: TypeAlias = Callable[[FrameType, str, Any], Any] # TODO: Recursive type
|
||||
_ExcInfo: TypeAlias = tuple[type[BaseException], BaseException, FrameType]
|
||||
|
||||
GENERATOR_AND_COROUTINE_FLAGS: Literal[672]
|
||||
|
||||
class BdbQuit(Exception): ...
|
||||
|
||||
class Bdb:
|
||||
|
||||
skip: set[str] | None
|
||||
breaks: dict[str, list[int]]
|
||||
fncache: dict[str, str]
|
||||
@@ -31,7 +30,7 @@ class Bdb:
|
||||
def dispatch_line(self, frame: FrameType) -> _TraceDispatch: ...
|
||||
def dispatch_call(self, frame: FrameType, arg: None) -> _TraceDispatch: ...
|
||||
def dispatch_return(self, frame: FrameType, arg: Any) -> _TraceDispatch: ...
|
||||
def dispatch_exception(self, frame: FrameType, arg: _ExcInfo) -> _TraceDispatch: ...
|
||||
def dispatch_exception(self, frame: FrameType, arg: ExcInfo) -> _TraceDispatch: ...
|
||||
def is_skipped_module(self, module_name: str) -> bool: ...
|
||||
def stop_here(self, frame: FrameType) -> bool: ...
|
||||
def break_here(self, frame: FrameType) -> bool: ...
|
||||
@@ -40,7 +39,7 @@ class Bdb:
|
||||
def user_call(self, frame: FrameType, argument_list: None) -> None: ...
|
||||
def user_line(self, frame: FrameType) -> None: ...
|
||||
def user_return(self, frame: FrameType, return_value: Any) -> None: ...
|
||||
def user_exception(self, frame: FrameType, exc_info: _ExcInfo) -> None: ...
|
||||
def user_exception(self, frame: FrameType, exc_info: ExcInfo) -> None: ...
|
||||
def set_until(self, frame: FrameType, lineno: int | None = ...) -> None: ...
|
||||
def set_step(self) -> None: ...
|
||||
def set_next(self, frame: FrameType) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user