Skip to content

Commit

Permalink
Fixed type hints in example code
Browse files Browse the repository at this point in the history
  • Loading branch information
kmvanbrunt committed Sep 4, 2020
1 parent e7bf6c1 commit 1054dda
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/features/modular_commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ command and each CommandSet
bokchoy_parser.add_argument('style', choices=['quartered', 'diced'])
@cmd2.as_subcommand_to('cut', 'bokchoy', bokchoy_parser)
def cut_bokchoy(self, _: cmd2.Statement):
def cut_bokchoy(self, _: argparse.Namespace):
self._cmd.poutput('Bok Choy')
Expand Down
2 changes: 1 addition & 1 deletion examples/modular_subcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def do_arugula(self, _: cmd2.Statement):
bokchoy_parser.add_argument('style', choices=['quartered', 'diced'])

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


Expand Down
2 changes: 1 addition & 1 deletion tests_isolated/test_commandset/test_commandset.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ def complete_style_arg(self, text: str, line: str, begidx: int, endidx: int) ->
bokchoy_parser.add_argument('style', completer_method=complete_style_arg)

@cmd2.as_subcommand_to('cut', 'bokchoy', bokchoy_parser)
def cut_bokchoy(self, _: cmd2.Statement):
def cut_bokchoy(self, _: argparse.Namespace):
self.poutput('Bok Choy')


Expand Down

0 comments on commit 1054dda

Please sign in to comment.