diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-01-15 13:18:01 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-01-15 13:18:01 -0500 |
commit | da0a44888312eefba3f6d8c07efd784875691129 (patch) | |
tree | 8d3cd58a162a187c84df1da8d05e4a1ff7f1cc30 /README.md | |
parent | b51d31bbec6960da1137762ac6217675cf368a40 (diff) | |
download | cmd2-git-da0a44888312eefba3f6d8c07efd784875691129.tar.gz |
Updated README.md due to @withargument_parser decorator now only passing a single argument to do_* methods
Diffstat (limited to 'README.md')
-rwxr-xr-x | README.md | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -105,7 +105,7 @@ Instructions for implementing each feature follow. argparser.add_argument('-s', '--shout', action='store_true', help='N00B EMULATION MODE') argparser.add_argument('words', nargs='+', help='words to say') @with_argument_parser(argparser) - def do_speak(self, cmdline, args=None): + def do_speak(self, args): """Repeats what you tell me to.""" words = [] for word in args.words: @@ -175,7 +175,7 @@ class CmdLineApp(Cmd): argparser.add_argument('-r', '--repeat', type=int, help='output [n] times') argparser.add_argument('words', nargs='+', help='words to say') @with_argument_parser(argparser) - def do_speak(self, cmdline, opts=None): + def do_speak(self, args): """Repeats what you tell me to.""" words = [] for word in args.words: @@ -196,7 +196,7 @@ class CmdLineApp(Cmd): argparser.add_argument('-r', '--repeat', type=int, help='how many times to repeat') argparser.add_argument('words', nargs='+', help='words to say') @with_argument_parser(argparser) - def do_mumble(self, cmdline, args=None): + def do_mumble(self, args): """Mumbles what you tell me to.""" repetitions = args.repeat or 1 for i in range(min(repetitions, self.maxrepeats)): |