mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-22 19:13:34 +08:00
Add _typeshed.(Opt)ExcInfo (#7645)
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
from _typeshed import StrOrBytesPath
|
||||
from _typeshed import OptExcInfo, StrOrBytesPath
|
||||
from types import FrameType, TracebackType
|
||||
from typing import IO, Any, Callable
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
_ExcInfo: TypeAlias = tuple[type[BaseException] | None, BaseException | None, TracebackType | None]
|
||||
|
||||
__UNDEF__: object # undocumented sentinel
|
||||
|
||||
@@ -15,8 +12,8 @@ def lookup(name: str, frame: FrameType, locals: dict[str, Any]) -> tuple[str | N
|
||||
def scanvars(
|
||||
reader: Callable[[], bytes], frame: FrameType, locals: dict[str, Any]
|
||||
) -> list[tuple[str, str | None, Any]]: ... # undocumented
|
||||
def html(einfo: _ExcInfo, context: int = ...) -> str: ...
|
||||
def text(einfo: _ExcInfo, context: int = ...) -> str: ...
|
||||
def html(einfo: OptExcInfo, context: int = ...) -> str: ...
|
||||
def text(einfo: OptExcInfo, context: int = ...) -> str: ...
|
||||
|
||||
class Hook: # undocumented
|
||||
def __init__(
|
||||
@@ -28,7 +25,7 @@ class Hook: # undocumented
|
||||
format: str = ...,
|
||||
) -> None: ...
|
||||
def __call__(self, etype: type[BaseException] | None, evalue: BaseException | None, etb: TracebackType | None) -> None: ...
|
||||
def handle(self, info: _ExcInfo | None = ...) -> None: ...
|
||||
def handle(self, info: OptExcInfo | None = ...) -> None: ...
|
||||
|
||||
def handler(info: _ExcInfo | None = ...) -> None: ...
|
||||
def handler(info: OptExcInfo | None = ...) -> None: ...
|
||||
def enable(display: int = ..., logdir: StrOrBytesPath | None = ..., context: int = ..., format: str = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user