| 1 |
from _typeshed import OptExcInfo, StrOrBytesPath |
| 2 |
from collections.abc import Callable |
| 3 |
from types import FrameType, TracebackType |
| 4 |
from typing import IO, Any, Final |
| 5 |
|
| 6 |
__UNDEF__: Final[object] |
| 7 |
|
| 8 |
def reset() -> str: ... |
| 9 |
def small(text: str) -> str: ... |
| 10 |
def strong(text: str) -> str: ... |
| 11 |
def grey(text: str) -> str: ... |
| 12 |
def lookup(name: str, frame: FrameType, locals: dict[str, Any]) -> tuple[str | None, Any]: ... |
| 13 |
def scanvars( |
| 14 |
reader: Callable[[], bytes], frame: FrameType, locals: dict[str, Any] |
| 15 |
) -> list[tuple[str, str | None, Any]]: ... |
| 16 |
def html(einfo: OptExcInfo, context: int = 5) -> str: ... |
| 17 |
def text(einfo: OptExcInfo, context: int = 5) -> str: ... |
| 18 |
|
| 19 |
class Hook: |
| 20 |
def __init__( |
| 21 |
self, |
| 22 |
display: int = 1, |
| 23 |
logdir: StrOrBytesPath | None = None, |
| 24 |
context: int = 5, |
| 25 |
file: IO[str] | None = None, |
| 26 |
format: str = "html", |
| 27 |
) -> None: ... |
| 28 |
def __call__(self, etype: type[BaseException] | None, evalue: BaseException | None, etb: TracebackType | None) -> None: ... |
| 29 |
def handle(self, info: OptExcInfo | None = None) -> None: ... |
| 30 |
|
| 31 |
def handler(info: OptExcInfo | None = None) -> None: ... |
| 32 |
def enable(display: int = 1, logdir: StrOrBytesPath | None = None, context: int = 5, format: str = "html") -> None: ... |