|
|
| __init__ (self, Optional[Trace] trace=None, *Optional[int] width=100, int extra_lines=3, Optional[str] theme=None, bool word_wrap=False, bool show_locals=False, int locals_max_length=LOCALS_MAX_LENGTH, int locals_max_string=LOCALS_MAX_STRING, bool locals_hide_dunder=True, bool locals_hide_sunder=False, bool indent_guides=True, Iterable[Union[str, ModuleType]] suppress=(), int max_frames=100) |
| |
| "Traceback" | from_exception (cls, Type[Any] exc_type, BaseException exc_value, Optional[TracebackType] traceback, *Optional[int] width=100, int extra_lines=3, Optional[str] theme=None, bool word_wrap=False, bool show_locals=False, int locals_max_length=LOCALS_MAX_LENGTH, int locals_max_string=LOCALS_MAX_STRING, bool locals_hide_dunder=True, bool locals_hide_sunder=False, bool indent_guides=True, Iterable[Union[str, ModuleType]] suppress=(), int max_frames=100) |
| |
| Trace | extract (cls, Type[BaseException] exc_type, BaseException exc_value, Optional[TracebackType] traceback, *bool show_locals=False, int locals_max_length=LOCALS_MAX_LENGTH, int locals_max_string=LOCALS_MAX_STRING, bool locals_hide_dunder=True, bool locals_hide_sunder=False) |
| |
|
RenderResult | __rich_console__ (self, Console console, ConsoleOptions options) |
| |
A Console renderable that renders a traceback.
Args:
trace (Trace, optional): A `Trace` object produced from `extract`. Defaults to None, which uses
the last exception.
width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
theme (str, optional): Override pygments theme used in traceback.
word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
show_locals (bool, optional): Enable display of local variables. Defaults to False.
indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
Defaults to 10.
locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.
| Trace pip._vendor.rich.traceback.Traceback.extract |
( |
|
cls, |
|
|
Type[BaseException] |
exc_type, |
|
|
BaseException |
exc_value, |
|
|
Optional[TracebackType] |
traceback, |
|
|
*bool |
show_locals = False, |
|
|
int |
locals_max_length = LOCALS_MAX_LENGTH, |
|
|
int |
locals_max_string = LOCALS_MAX_STRING, |
|
|
bool |
locals_hide_dunder = True, |
|
|
bool |
locals_hide_sunder = False |
|
) |
| |
Extract traceback information.
Args:
exc_type (Type[BaseException]): Exception type.
exc_value (BaseException): Exception value.
traceback (TracebackType): Python Traceback object.
show_locals (bool, optional): Enable display of local variables. Defaults to False.
locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
Defaults to 10.
locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
Returns:
Trace: A Trace instance which you can use to construct a `Traceback`.
| "Traceback" pip._vendor.rich.traceback.Traceback.from_exception |
( |
|
cls, |
|
|
Type[Any] |
exc_type, |
|
|
BaseException |
exc_value, |
|
|
Optional[TracebackType] |
traceback, |
|
|
*Optional[int] |
width = 100, |
|
|
int |
extra_lines = 3, |
|
|
Optional[str] |
theme = None, |
|
|
bool |
word_wrap = False, |
|
|
bool |
show_locals = False, |
|
|
int |
locals_max_length = LOCALS_MAX_LENGTH, |
|
|
int |
locals_max_string = LOCALS_MAX_STRING, |
|
|
bool |
locals_hide_dunder = True, |
|
|
bool |
locals_hide_sunder = False, |
|
|
bool |
indent_guides = True, |
|
|
Iterable[Union[str, ModuleType]] |
suppress = (), |
|
|
int |
max_frames = 100 |
|
) |
| |
Create a traceback from exception info
Args:
exc_type (Type[BaseException]): Exception type.
exc_value (BaseException): Exception value.
traceback (TracebackType): Python Traceback object.
width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
theme (str, optional): Override pygments theme used in traceback.
word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
show_locals (bool, optional): Enable display of local variables. Defaults to False.
indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
Defaults to 10.
locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
suppress (Iterable[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.
Returns:
Traceback: A Traceback instance that may be printed.