summaryrefslogtreecommitdiff
path: root/examples/modular_commands
diff options
context:
space:
mode:
Diffstat (limited to 'examples/modular_commands')
-rw-r--r--examples/modular_commands/commandset_basic.py3
-rw-r--r--examples/modular_commands/commandset_complex.py3
2 files changed, 2 insertions, 4 deletions
diff --git a/examples/modular_commands/commandset_basic.py b/examples/modular_commands/commandset_basic.py
index 2ceda439..9c94e01e 100644
--- a/examples/modular_commands/commandset_basic.py
+++ b/examples/modular_commands/commandset_basic.py
@@ -4,8 +4,7 @@ A simple example demonstrating a loadable command set
"""
from typing import List
-from cmd2 import Cmd, CommandSet, Statement, with_category, with_default_category
-from cmd2.utils import CompletionError
+from cmd2 import Cmd, CommandSet, CompletionError, Statement, with_category, with_default_category
@with_default_category('Basic Completion')
diff --git a/examples/modular_commands/commandset_complex.py b/examples/modular_commands/commandset_complex.py
index 7c6b1300..a4343ae3 100644
--- a/examples/modular_commands/commandset_complex.py
+++ b/examples/modular_commands/commandset_complex.py
@@ -8,7 +8,6 @@ import argparse
from typing import List
import cmd2
-from cmd2 import utils
@cmd2.with_default_category('Fruits')
@@ -42,7 +41,7 @@ class CommandSetA(cmd2.CommandSet):
self._cmd.poutput(', '.join(['{}']*len(args)).format(*args))
def complete_durian(self, text: str, line: str, begidx: int, endidx: int) -> List[str]:
- return utils.basic_complete(text, line, begidx, endidx, ['stinks', 'smells', 'disgusting'])
+ return self._cmd.basic_complete(text, line, begidx, endidx, ['stinks', 'smells', 'disgusting'])
elderberry_parser = cmd2.Cmd2ArgumentParser('elderberry')
elderberry_parser.add_argument('arg1')