Skip to content

Commit

Permalink
Update modular_commands.rst (#1199)
Browse files Browse the repository at this point in the history
* Update modular_commands.rst

The args given in the example are integers. Direct concatenation to string raises errors

* Changed to f-string as per review comment

Co-authored-by: Todd Leonhardt <todd.leonhardt@gmail.com>
  • Loading branch information
viralmutant and tleonhardt committed Feb 16, 2022
1 parent 716ab8a commit 1050d99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/features/modular_commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ CommandSets and pass in the constructor to Cmd2.
self._arg2 = arg2
def do_show_arg1(self, _: cmd2.Statement):
self._cmd.poutput('Arg1: ' + self._arg1)
self._cmd.poutput(f'Arg1: {self._arg1}')
def do_show_arg2(self, _: cmd2.Statement):
self._cmd.poutput('Arg2: ' + self._arg2)
self._cmd.poutput(f'Arg2: {self._arg2}')
class ExampleApp(cmd2.Cmd):
"""
Expand Down

0 comments on commit 1050d99

Please sign in to comment.