Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
pip._vendor.rich.traceback.Traceback Class Reference

Public Member Functions

 __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)
 

Public Attributes

 trace
 
 width
 
 extra_lines
 
 theme
 
 word_wrap
 
 show_locals
 
 indent_guides
 
 locals_max_length
 
 locals_max_string
 
 locals_hide_dunder
 
 locals_hide_sunder
 
 max_frames
 

Static Public Attributes

dict LEXERS
 

Protected Member Functions

RenderResult _render_syntax_error (self, _SyntaxError syntax_error)
 
str _guess_lexer (cls, str filename, str code)
 
RenderResult _render_stack (self, Stack stack)
 

Detailed Description

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.

Member Function Documentation

◆ extract()

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`.

◆ from_exception()

"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.

Member Data Documentation

◆ LEXERS

dict pip._vendor.rich.traceback.Traceback.LEXERS
static
Initial value:
= {
"": "text",
".py": "python",
".pxd": "cython",
".pyx": "cython",
".pxi": "pyrex",
}

The documentation for this class was generated from the following file: