summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-07-06 18:03:12 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-07-06 18:03:12 -0400
commitf8f06bff169dca1f0c6ee1dbb2d61c347490b3bb (patch)
tree85c15a4b96b4eb8dca48b9fdab2102528ba1569a /cmd2/cmd2.py
parent9eed45b2c54a058f2ce4e448148e5ed99c0d7925 (diff)
downloadcmd2-git-f8f06bff169dca1f0c6ee1dbb2d61c347490b3bb.tar.gz
More unit tests
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index e6d4ae47..009b1359 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -1584,18 +1584,18 @@ class Cmd(cmd.Cmd):
def _autocomplete_default(self, text: str, line: str, begidx: int, endidx: int,
argparser: argparse.ArgumentParser) -> List[str]:
- """Default completion function for argparse commands."""
+ """Default completion function for argparse commands"""
completer = AutoCompleter(argparser, self)
tokens, _ = self.tokens_for_completion(line, begidx, endidx)
return completer.complete_command(tokens, text, line, begidx, endidx)
def get_all_commands(self) -> List[str]:
- """Returns a list of all commands."""
+ """Return a list of all commands"""
return [name[len(COMMAND_FUNC_PREFIX):] for name in self.get_names()
if name.startswith(COMMAND_FUNC_PREFIX) and callable(getattr(self, name))]
def get_visible_commands(self) -> List[str]:
- """Returns a list of commands that have not been hidden or disabled."""
+ """Return a list of commands that have not been hidden or disabled"""
commands = self.get_all_commands()
# Remove the hidden commands