mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
34 lines
1.4 KiB
Python
34 lines
1.4 KiB
Python
from _typeshed import StrOrBytesPath
|
|
from types import FrameType, TracebackType
|
|
from typing import IO, Any, Callable, Optional
|
|
|
|
_ExcInfo = tuple[Optional[type[BaseException]], Optional[BaseException], Optional[TracebackType]]
|
|
|
|
__UNDEF__: object # undocumented sentinel
|
|
|
|
def reset() -> str: ... # undocumented
|
|
def small(text: str) -> str: ... # undocumented
|
|
def strong(text: str) -> str: ... # undocumented
|
|
def grey(text: str) -> str: ... # undocumented
|
|
def lookup(name: str, frame: FrameType, locals: dict[str, Any]) -> tuple[str | None, Any]: ... # undocumented
|
|
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: ...
|
|
|
|
class Hook: # undocumented
|
|
def __init__(
|
|
self,
|
|
display: int = ...,
|
|
logdir: StrOrBytesPath | None = ...,
|
|
context: int = ...,
|
|
file: IO[str] | None = ...,
|
|
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 handler(info: _ExcInfo | None = ...) -> None: ...
|
|
def enable(display: int = ..., logdir: StrOrBytesPath | None = ..., context: int = ..., format: str = ...) -> None: ...
|