summaryrefslogtreecommitdiff
path: root/cmd2/argparse_custom.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-07-30 20:08:05 -0400
committeranselor <anselor@gmail.com>2020-08-04 13:38:08 -0400
commit659d1660b3d0435eaaabfbf74ab49bea7636da10 (patch)
tree3d783a6d6cfd098731fb8438e7a0069c64322cbe /cmd2/argparse_custom.py
parentbcd5c0895a17bd10e755202c77204a2db8707c42 (diff)
downloadcmd2-git-659d1660b3d0435eaaabfbf74ab49bea7636da10.tar.gz
Updated documentation
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)