summaryrefslogtreecommitdiff
path: root/examples/modular_commands
diff options
context:
space:
mode:
authorEric Lin <anselor@gmail.com>2020-08-04 13:46:48 -0400
committeranselor <anselor@gmail.com>2020-08-04 15:24:53 -0400
commit1a82b37b6c23490b1d9127095e3ee4f2db21a85b (patch)
treeeb45b08c177ec9d032436af5d158a0ad065dc967 /examples/modular_commands
parentc983abaa881a3ac6110a90194def660489b2d5cc (diff)
downloadcmd2-git-1a82b37b6c23490b1d9127095e3ee4f2db21a85b.tar.gz
Marked with_arparser_and_unknown_args deprecated and consolidated
implementation as an option to with_argparser instead.
Diffstat (limited to 'examples/modular_commands')
-rw-r--r--examples/modular_commands/commandset_complex.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/modular_commands/commandset_complex.py b/examples/modular_commands/commandset_complex.py
index 5a031bd0..ec5a9e13 100644
--- a/examples/modular_commands/commandset_complex.py
+++ b/examples/modular_commands/commandset_complex.py
@@ -23,7 +23,7 @@ class CommandSetA(cmd2.CommandSet):
cranberry_parser = cmd2.Cmd2ArgumentParser('cranberry')
cranberry_parser.add_argument('arg1', choices=['lemonade', 'juice', 'sauce'])
- @cmd2.with_argparser_and_unknown_args(cranberry_parser)
+ @cmd2.with_argparser(cranberry_parser, with_unknown_args=True)
def do_cranberry(self, cmd: cmd2.Cmd, ns: argparse.Namespace, unknown: List[str]):
cmd.poutput('Cranberry {}!!'.format(ns.arg1))
if unknown and len(unknown):