Rich console for printing exceptions and Rich Tracebacks. Ensures that output is always word-wrapped for readability and disables Rich's automatic detection for markup, emoji, and highlighting to prevent interference with raw error data.
| 602 | |
| 603 | |
| 604 | class Cmd2ExceptionConsole(Cmd2BaseConsole): |
| 605 | """Rich console for printing exceptions and Rich Tracebacks. |
| 606 | |
| 607 | Ensures that output is always word-wrapped for readability and disables |
| 608 | Rich's automatic detection for markup, emoji, and highlighting to prevent |
| 609 | interference with raw error data. |
| 610 | """ |
| 611 | |
| 612 | def __init__(self, *, file: IO[str] | None = None) -> None: |
| 613 | """Cmd2ExceptionConsole initializer. |
| 614 | |
| 615 | :param file: optional file object where the console should write to. |
| 616 | Defaults to sys.stdout. |
| 617 | """ |
| 618 | super().__init__( |
| 619 | file=file, |
| 620 | soft_wrap=False, |
| 621 | markup=False, |
| 622 | emoji=False, |
| 623 | highlight=False, |
| 624 | ) |
| 625 | |
| 626 | |
| 627 | class Cmd2SimpleTable(Table): |
no outgoing calls
no test coverage detected
searching dependent graphs…