From 8e101a25dc514b1a713178983063c387bf0d14e4 Mon Sep 17 00:00:00 2001 From: Daniel Goldstein Date: Fri, 23 Jun 2023 15:11:02 -0400 Subject: [PATCH] [hailctl] Dont show local variables in stacktraces --- hail/python/hailtop/hailctl/__main__.py | 6 +++++- hail/python/hailtop/hailctl/auth/cli.py | 1 + hail/python/hailtop/hailctl/batch/billing/cli.py | 1 + hail/python/hailtop/hailctl/batch/cli.py | 1 + hail/python/hailtop/hailctl/config/cli.py | 1 + hail/python/hailtop/hailctl/dataproc/cli.py | 7 ++++++- hail/python/hailtop/hailctl/dev/cli.py | 1 + hail/python/hailtop/hailctl/hdinsight/cli.py | 7 ++++++- 8 files changed, 22 insertions(+), 3 deletions(-) diff --git a/hail/python/hailtop/hailctl/__main__.py b/hail/python/hailtop/hailctl/__main__.py index 09538e23ff9..745533e7a97 100644 --- a/hail/python/hailtop/hailctl/__main__.py +++ b/hail/python/hailtop/hailctl/__main__.py @@ -10,7 +10,11 @@ from .hdinsight import cli as hdinsight_cli -app = typer.Typer(help='Manage and monitor hail deployments.', no_args_is_help=True) +app = typer.Typer( + help='Manage and monitor hail deployments.', + no_args_is_help=True, + pretty_exceptions_show_locals=False, +) for cli in ( auth_cli.app, diff --git a/hail/python/hailtop/hailctl/auth/cli.py b/hail/python/hailtop/hailctl/auth/cli.py index 65584200c52..f2a6792ad71 100644 --- a/hail/python/hailtop/hailctl/auth/cli.py +++ b/hail/python/hailtop/hailctl/auth/cli.py @@ -12,6 +12,7 @@ name='auth', no_args_is_help=True, help='Manage Hail credentials.', + pretty_exceptions_show_locals=False, ) diff --git a/hail/python/hailtop/hailctl/batch/billing/cli.py b/hail/python/hailtop/hailctl/batch/billing/cli.py index c3a7f52f361..7e9b198ccad 100644 --- a/hail/python/hailtop/hailctl/batch/billing/cli.py +++ b/hail/python/hailtop/hailctl/batch/billing/cli.py @@ -7,6 +7,7 @@ name='billing', no_args_is_help=True, help='Manage billing on the service managed by the Hail team.', + pretty_exceptions_show_locals=False, ) diff --git a/hail/python/hailtop/hailctl/batch/cli.py b/hail/python/hailtop/hailctl/batch/cli.py index f65ddb52422..17d2cef9772 100644 --- a/hail/python/hailtop/hailctl/batch/cli.py +++ b/hail/python/hailtop/hailctl/batch/cli.py @@ -27,6 +27,7 @@ name='batch', no_args_is_help=True, help='Manage batches running on the batch service managed by the Hail team.', + pretty_exceptions_show_locals=False, ) app.add_typer(billing.cli.app) diff --git a/hail/python/hailtop/hailctl/config/cli.py b/hail/python/hailtop/hailctl/config/cli.py index 021aa268570..0d8042bd5e9 100644 --- a/hail/python/hailtop/hailctl/config/cli.py +++ b/hail/python/hailtop/hailctl/config/cli.py @@ -14,6 +14,7 @@ name='config', no_args_is_help=True, help='Manage Hail configuration.', + pretty_exceptions_show_locals=False, ) diff --git a/hail/python/hailtop/hailctl/dataproc/cli.py b/hail/python/hailtop/hailctl/dataproc/cli.py index 393e6597f53..a836b544bdd 100644 --- a/hail/python/hailtop/hailctl/dataproc/cli.py +++ b/hail/python/hailtop/hailctl/dataproc/cli.py @@ -49,7 +49,12 @@ ] -app = typer.Typer(name='dataproc', no_args_is_help=True, help='Manage Hail Dataproc clusters.') +app = typer.Typer( + name='dataproc', + no_args_is_help=True, + help='Manage Hail Dataproc clusters.', + pretty_exceptions_show_locals=False, +) @app.callback() diff --git a/hail/python/hailtop/hailctl/dev/cli.py b/hail/python/hailtop/hailctl/dev/cli.py index 23b6ed98879..635b85079fe 100644 --- a/hail/python/hailtop/hailctl/dev/cli.py +++ b/hail/python/hailtop/hailctl/dev/cli.py @@ -14,6 +14,7 @@ name='dev', no_args_is_help=True, help='Manage Hail development utilities.', + pretty_exceptions_show_locals=False, ) app.add_typer( config.app, diff --git a/hail/python/hailtop/hailctl/hdinsight/cli.py b/hail/python/hailtop/hailctl/hdinsight/cli.py index 6fb9644bda0..39fa62eabd1 100644 --- a/hail/python/hailtop/hailctl/hdinsight/cli.py +++ b/hail/python/hailtop/hailctl/hdinsight/cli.py @@ -10,7 +10,12 @@ from .submit import submit as hdinsight_submit -app = typer.Typer(name='hdinsight', no_args_is_help=True, help='Manage and monitor Hail HDInsight clusters.') +app = typer.Typer( + name='hdinsight', + no_args_is_help=True, + help='Manage and monitor Hail HDInsight clusters.', + pretty_exceptions_show_locals=False, +) @app.command(context_settings={"allow_extra_args": True, "ignore_unknown_options": True})