summaryrefslogtreecommitdiff
path: root/cmd2/argparse_custom.py
diff options
context:
space:
mode:
Diffstat (limited to 'cmd2/argparse_custom.py')
-rw-r--r--cmd2/argparse_custom.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd2/argparse_custom.py b/cmd2/argparse_custom.py
index 80213bf8..4c417a6d 100644
--- a/cmd2/argparse_custom.py
+++ b/cmd2/argparse_custom.py
@@ -197,6 +197,10 @@ See _get_nargs_pattern_wrapper for more details.
``argparse.ArgumentParser._match_argument`` - adds support for nargs ranges.
See _match_argument_wrapper for more details.
+
+``argparse._SubParsersAction.remove_parser`` - new function which removes a
+sub-parser from a sub-parsers group. See _SubParsersAction_remove_parser for
+more details.
"""
import argparse
@@ -534,7 +538,7 @@ argparse.ArgumentParser._match_argument = _match_argument_wrapper
############################################################################################################
def _SubParsersAction_remove_parser(self, name):
- """Removes a sub-parser from the sub-parsers group"""
+ """Removes a sub-parser from a sub-parsers group"""
for choice_action in self._choices_actions:
if choice_action.dest == name:
self._choices_actions.remove(choice_action)