Format: application/octet-stream
⬇ Download File (1.4 KB)
   1  from _typeshed import AnyPath
   2  from types import FrameType, TracebackType
   3  from typing import IO, Any, Callable, Dict, List, Optional, Tuple, Type
   4  
   5  _ExcInfo = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]]
   6  
   7  def reset() -> str: ...  # undocumented
   8  def small(text: str) -> str: ...  # undocumented
   9  def strong(text: str) -> str: ...  # undocumented
  10  def grey(text: str) -> str: ...  # undocumented
  11  def lookup(name: str, frame: FrameType, locals: Dict[str, Any]) -> Tuple[Optional[str], Any]: ...  # undocumented
  12  def scanvars(
  13      reader: Callable[[], bytes], frame: FrameType, locals: Dict[str, Any]
  14  ) -> List[Tuple[str, Optional[str], Any]]: ...  # undocumented
  15  def html(einfo: _ExcInfo, context: int = ...) -> str: ...
  16  def text(einfo: _ExcInfo, context: int = ...) -> str: ...
  17  
  18  class Hook:  # undocumented
  19      def __init__(
  20          self,
  21          display: int = ...,
  22          logdir: Optional[AnyPath] = ...,
  23          context: int = ...,
  24          file: Optional[IO[str]] = ...,
  25          format: str = ...,
  26      ) -> None: ...
  27      def __call__(
  28          self, etype: Optional[Type[BaseException]], evalue: Optional[BaseException], etb: Optional[TracebackType]
  29      ) -> None: ...
  30      def handle(self, info: Optional[_ExcInfo] = ...) -> None: ...
  31  
  32  def handler(info: Optional[_ExcInfo] = ...) -> None: ...
  33  def enable(display: int = ..., logdir: Optional[AnyPath] = ..., context: int = ..., format: str = ...) -> None: ...
  34