@@ -48,7 +48,7 @@ def with_category(
4848 ```py
4949 class MyApp(cmd2.Cmd):
5050 @cmd2.with_category('Text Functions')
51- def do_echo(self, args)
51+ def do_echo(self, args: cmd2.Statement) -> None:
5252 self.poutput(args)
5353 ```
5454
@@ -153,12 +153,12 @@ def with_argument_list(
153153 class MyApp(cmd2.Cmd):
154154 # Basic usage: receives a list of words with quotes stripped
155155 @cmd2.with_argument_list
156- def do_echo(self, arglist: list[str]):
156+ def do_echo(self, arglist: list[str]) -> None :
157157 self.poutput(' '.join(arglist))
158158
159159 # Factory usage: preserves quotes in the argument list
160160 @cmd2.with_argument_list(preserve_quotes=True)
161- def do_print_raw(self, arglist: list[str]):
161+ def do_print_raw(self, arglist: list[str]) -> None :
162162 self.poutput(' '.join(arglist))
163163 ```
164164
@@ -238,7 +238,7 @@ def with_argparser(
238238
239239 class MyApp(cmd2.Cmd):
240240 @cmd2.with_argparser(parser, preserve_quotes=True)
241- def do_argprint(self, args) :
241+ def do_argprint(self, args: argparse.Namespace) -> None :
242242 "Print the options and argument list this options command was called with."
243243 self.poutput(f'args: {args!r}')
244244 ```
@@ -378,8 +378,8 @@ class MyApp(cmd2.Cmd):
378378 def do_base(self, args: argparse.Namespace) -> None:
379379 args.cmd2_subcmd_handler(args)
380380
381- @cmd2.as_subcommand_to('base', 'sub', sub_parser, help="the subcommand") -> None:
382- def sub_handler(self, args: argparse.Namespace):
381+ @cmd2.as_subcommand_to('base', 'sub', sub_parser, help="the subcommand")
382+ def sub_handler(self, args: argparse.Namespace) -> None :
383383 self.poutput('Subcommand executed')
384384 ```
385385
0 commit comments