From 196208ae58bf83b4c400d549023d8f936eece5b1 Mon Sep 17 00:00:00 2001 From: Jordan Bradford <36420801+jrdnbradford@users.noreply.github.com> Date: Wed, 3 Apr 2024 13:30:32 -0400 Subject: [PATCH] Remove `argparse.BooleanOptionalAction` for Python 3.8 compatibility --- tljh/config.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tljh/config.py b/tljh/config.py index 849fdb5c..3f942c84 100644 --- a/tljh/config.py +++ b/tljh/config.py @@ -356,11 +356,17 @@ def main(argv=None): argparser.add_argument( "--config-path", default=CONFIG_FILE, help="Path to TLJH config.yaml file" ) + + argparser.add_argument( + "--validate", action="store_true", help="Validate the TLJH config" + ) argparser.add_argument( - "--validate", - action=argparse.BooleanOptionalAction, - help="Validate the TLJH config", + "--no-validate", + dest="validate", + action="store_false", + help="Do not validate the TLJH config", ) + argparser.set_defaults(validate=True) subparsers = argparser.add_subparsers(dest="action")