summaryrefslogtreecommitdiff
path: root/cmd2
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-10-06 19:07:00 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2018-10-06 19:07:00 -0400
commite018924a28443e8e6f608d9b9796b2b826653490 (patch)
tree5dee77d4ae99e99f71b1fba1a33a206c5933f903 /cmd2
parenta77be185c245e4cd04fe348e050a177b9b327471 (diff)
downloadcmd2-git-e018924a28443e8e6f608d9b9796b2b826653490.tar.gz
Added documentation stating that parsers passed to argparse decorators need to be unique
Also: - Modified table_display.py to demonstrate a workaround
Diffstat (limited to 'cmd2')
-rw-r--r--cmd2/cmd2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 4502c53a..c000fb80 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -193,7 +193,7 @@ def with_argparser_and_unknown_args(argparser: argparse.ArgumentParser, preserve
"""A decorator to alter a cmd2 method to populate its ``args`` argument by parsing arguments with the given
instance of argparse.ArgumentParser, but also returning unknown args as a list.
- :param argparser: given instance of ArgumentParser
+ :param argparser: unique instance of ArgumentParser
:param preserve_quotes: if True, then the arguments passed to arparse be maintain their quotes
:return: function that gets passed parsed args and a list of unknown args
"""
@@ -234,7 +234,7 @@ def with_argparser(argparser: argparse.ArgumentParser, preserve_quotes: bool=Fal
"""A decorator to alter a cmd2 method to populate its ``args`` argument by parsing arguments
with the given instance of argparse.ArgumentParser.
- :param argparser: given instance of ArgumentParser
+ :param argparser: unique instance of ArgumentParser
:param preserve_quotes: if True, then the arguments passed to arparse be maintain their quotes
:return: function that gets passed parsed args
"""