Skip to content

Commit

Permalink
skip verbose flag in secondary parser (#576)
Browse files Browse the repository at this point in the history
When parsing the command line options on the CLI the `verbose` flag
count is already treated uniquely. This change removes `verbose` from
the `aux_parser` to avoid inconsistent `action` expectations.

Signed-off-by: Jeffrey Martin <jemartin@nvidia.com>
  • Loading branch information
jmartin-tech authored Mar 26, 2024
1 parent 1af61aa commit 8f5bf3d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions garak/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ def main(arguments=[]) -> None:
arg_names[raw_option_string] = action.option_strings

for arg, val in vars(args).items():
if arg == 'verbose':
# the 'verbose' flag is currently unique and retrieved from `args` directly
continue
if isinstance(val, bool):
if val:
aux_parser.add_argument(*arg_names[arg], action="store_true")
Expand Down

0 comments on commit 8f5bf3d

Please sign in to comment.