Skip to content

Commit

Permalink
cli: hide local variables in exceptions by default
Browse files Browse the repository at this point in the history
Tracebacks that include test results or test vectors are often too long,
so hide the local variables by default, while keeping the option to
display them when increasing the verbosity.
  • Loading branch information
JulioLoayzaM committed Jul 1, 2024
1 parent c4a6da1 commit 8cbe7da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crypto_condor/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
rich_markup_mode="rich",
no_args_is_help=True,
context_settings={"max_content_width": console.width},
pretty_exceptions_show_locals=False,
)
app.add_typer(test.app, name="test", rich_help_panel="Test implementations")

Expand Down Expand Up @@ -412,3 +413,5 @@ def main(
:func:`~crypto_condor.cli.callbacks.print_version` callback.
"""
set_logging(verbose)
if verbose >= 2:
app.pretty_exceptions_show_locals = True

0 comments on commit 8cbe7da

Please sign in to comment.