stdlib: audit more callback annotations (#8209)

This commit is contained in:
Alex Waygood
2022-07-19 15:07:25 +01:00
committed by GitHub
parent 540a6b25bf
commit e2ce7c6344
21 changed files with 61 additions and 64 deletions

View File

@@ -1,15 +1,14 @@
import sys
from _typeshed import ExcInfo
from _typeshed import ExcInfo, TraceFunction
from collections.abc import Callable, Iterable, Mapping
from types import CodeType, FrameType, TracebackType
from typing import IO, Any, SupportsInt, TypeVar
from typing_extensions import Literal, ParamSpec, TypeAlias
from typing_extensions import Literal, ParamSpec
__all__ = ["BdbQuit", "Bdb", "Breakpoint"]
_T = TypeVar("_T")
_P = ParamSpec("_P")
_TraceDispatch: TypeAlias = Callable[[FrameType, str, Any], Any] # TODO: Recursive type
GENERATOR_AND_COROUTINE_FLAGS: Literal[672]
@@ -28,11 +27,11 @@ class Bdb:
def __init__(self, skip: Iterable[str] | None = ...) -> None: ...
def canonic(self, filename: str) -> str: ...
def reset(self) -> None: ...
def trace_dispatch(self, frame: FrameType, event: str, arg: Any) -> _TraceDispatch: ...
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 trace_dispatch(self, frame: FrameType, event: str, arg: Any) -> TraceFunction: ...
def dispatch_line(self, frame: FrameType) -> TraceFunction: ...
def dispatch_call(self, frame: FrameType, arg: None) -> TraceFunction: ...
def dispatch_return(self, frame: FrameType, arg: Any) -> TraceFunction: ...
def dispatch_exception(self, frame: FrameType, arg: ExcInfo) -> TraceFunction: ...
def is_skipped_module(self, module_name: str) -> bool: ...
def stop_here(self, frame: FrameType) -> bool: ...
def break_here(self, frame: FrameType) -> bool: ...