Skip to content

Commit 1054dda

Browse files
committed
Fixed type hints in example code
1 parent e7bf6c1 commit 1054dda

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/features/modular_commands.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ command and each CommandSet
293293
bokchoy_parser.add_argument('style', choices=['quartered', 'diced'])
294294
295295
@cmd2.as_subcommand_to('cut', 'bokchoy', bokchoy_parser)
296-
def cut_bokchoy(self, _: cmd2.Statement):
296+
def cut_bokchoy(self, _: argparse.Namespace):
297297
self._cmd.poutput('Bok Choy')
298298
299299

examples/modular_subcommands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def do_arugula(self, _: cmd2.Statement):
4646
bokchoy_parser.add_argument('style', choices=['quartered', 'diced'])
4747

4848
@cmd2.as_subcommand_to('cut', 'bokchoy', bokchoy_parser, help=bokchoy_description.lower())
49-
def cut_bokchoy(self, _: cmd2.Statement):
49+
def cut_bokchoy(self, _: argparse.Namespace):
5050
self._cmd.poutput('Bok Choy')
5151

5252

tests_isolated/test_commandset/test_commandset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ def complete_style_arg(self, text: str, line: str, begidx: int, endidx: int) ->
647647
bokchoy_parser.add_argument('style', completer_method=complete_style_arg)
648648

649649
@cmd2.as_subcommand_to('cut', 'bokchoy', bokchoy_parser)
650-
def cut_bokchoy(self, _: cmd2.Statement):
650+
def cut_bokchoy(self, _: argparse.Namespace):
651651
self.poutput('Bok Choy')
652652

653653

0 commit comments

Comments
 (0)