From 1a82b37b6c23490b1d9127095e3ee4f2db21a85b Mon Sep 17 00:00:00 2001 From: Eric Lin Date: Tue, 4 Aug 2020 13:46:48 -0400 Subject: Marked with_arparser_and_unknown_args deprecated and consolidated implementation as an option to with_argparser instead. --- tests/test_transcript.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/test_transcript.py') diff --git a/tests/test_transcript.py b/tests/test_transcript.py index 69389b7f..55d60e18 100644 --- a/tests/test_transcript.py +++ b/tests/test_transcript.py @@ -41,7 +41,7 @@ class CmdLineApp(cmd2.Cmd): speak_parser.add_argument('-s', '--shout', action="store_true", help="N00B EMULATION MODE") speak_parser.add_argument('-r', '--repeat', type=int, help="output [n] times") - @cmd2.with_argparser_and_unknown_args(speak_parser) + @cmd2.with_argparser(speak_parser, with_unknown_args=True) def do_speak(self, opts, arg): """Repeats what you tell me to.""" arg = ' '.join(arg) @@ -61,7 +61,8 @@ class CmdLineApp(cmd2.Cmd): mumble_parser = argparse.ArgumentParser() mumble_parser.add_argument('-r', '--repeat', type=int, help="output [n] times") - @cmd2.with_argparser_and_unknown_args(mumble_parser) + + @cmd2.with_argparser(mumble_parser, with_unknown_args=True) def do_mumble(self, opts, arg): """Mumbles what you tell me to.""" repetitions = opts.repeat or 1 -- cgit v1.2.1