From 19f69473c86040e76e72c66726ce7c066ef9e9ee Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 30 Apr 2022 07:21:57 -0700 Subject: [PATCH] Add AppendAction to store_types. --- voussoirkit/betterhelp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/voussoirkit/betterhelp.py b/voussoirkit/betterhelp.py index ac00644..f764cb4 100644 --- a/voussoirkit/betterhelp.py +++ b/voussoirkit/betterhelp.py @@ -183,6 +183,7 @@ def make_helptext( named_actions = [] required_named_actions = [] optional_named_actions = [] + store_types = {argparse._StoreAction, argparse._AppendAction} flag_types = {argparse._StoreTrueAction, argparse._StoreFalseAction, argparse._StoreConstAction} flag_actions = [] @@ -194,7 +195,7 @@ def make_helptext( all_command_names.update(action.choices.keys()) continue - if type(action) is argparse._StoreAction: + if type(action) in store_types: if action.option_strings == []: positional_actions.append(action) all_positional_names.add(action.dest)