Skip to content

Commit b61793c

Browse files
committed
Fix TypeError in CustomInitCommandSet.do_show_arg* methods
Remove the extra '_cmd' argument from 'do_show_arg1' and 'do_show_arg2' in 'examples/modular_commands/commandset_custominit.py'. This fixes a TypeError where the commands expected 3 arguments but were called with 2 during execution.
1 parent e4fdece commit b61793c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/modular_commands/commandset_custominit.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""A simple example demonstrating a loadable command set."""
22

33
from cmd2 import (
4-
Cmd,
54
CommandSet,
65
Statement,
76
with_default_category,
@@ -16,8 +15,8 @@ def __init__(self, arg1, arg2) -> None:
1615
self._arg1 = arg1
1716
self._arg2 = arg2
1817

19-
def do_show_arg1(self, _cmd: Cmd, _: Statement) -> None:
18+
def do_show_arg1(self, _: Statement) -> None:
2019
self._cmd.poutput('Arg1: ' + self._arg1)
2120

22-
def do_show_arg2(self, _cmd: Cmd, _: Statement) -> None:
21+
def do_show_arg2(self, _: Statement) -> None:
2322
self._cmd.poutput('Arg2: ' + self._arg2)

0 commit comments

Comments
 (0)