Skip to content

Commit c30bf17

Browse files
committed
Merge branch 'main' into prompt-toolkit
2 parents f578699 + 37afbd6 commit c30bf17

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

examples/modular_commands.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import argparse
88
from collections.abc import Iterable
99

10-
from modular_commands.commandset_basic import ( # noqa: F401
10+
from modular_commands.commandset_basic import (
1111
BasicCompletionCommandSet,
1212
)
13-
from modular_commands.commandset_complex import ( # noqa: F401
13+
from modular_commands.commandset_complex import (
1414
CommandSetA,
1515
)
1616
from modular_commands.commandset_custominit import (
@@ -64,6 +64,6 @@ def do_example(self, _: argparse.Namespace) -> None:
6464
import sys
6565

6666
print("Starting")
67-
my_sets = [CustomInitCommandSet('First argument', 'Second argument')]
67+
my_sets = [BasicCompletionCommandSet(), CommandSetA(), CustomInitCommandSet('First argument', 'Second argument')]
6868
app = WithCommandSets(command_sets=my_sets)
6969
sys.exit(app.cmdloop())

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)