summaryrefslogtreecommitdiff
path: root/examples/modular_commands_main.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2021-02-19 21:40:15 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2021-02-19 21:40:15 -0500
commit486b8c726a7d657ef320e68598077c31fa664790 (patch)
tree46b53d0f530d6ae273c4379272684ee80026658a /examples/modular_commands_main.py
parent3e180a810e9c4b9d251c135667d1d150b0bbd0dd (diff)
downloadcmd2-git-486b8c726a7d657ef320e68598077c31fa664790.tar.gz
Fixed black, isort, flake8, and doc8 issues
Diffstat (limited to 'examples/modular_commands_main.py')
-rw-r--r--examples/modular_commands_main.py30
1 files changed, 16 insertions, 14 deletions
diff --git a/examples/modular_commands_main.py b/examples/modular_commands_main.py
index fc0be7b0..3aeb8b2a 100644
--- a/examples/modular_commands_main.py
+++ b/examples/modular_commands_main.py
@@ -11,20 +11,21 @@ from typing import (
Optional,
)
-from cmd2 import (
- Cmd,
- Cmd2ArgumentParser,
- CommandSet,
- with_argparser,
-)
from modular_commands.commandset_basic import ( # noqa: F401
BasicCompletionCommandSet,
)
from modular_commands.commandset_complex import ( # noqa: F401
CommandSetA,
)
-from modular_commands.commandset_custominit import (
- CustomInitCommandSet, # noqa: F401
+from modular_commands.commandset_custominit import ( # noqa: F401
+ CustomInitCommandSet,
+)
+
+from cmd2 import (
+ Cmd,
+ Cmd2ArgumentParser,
+ CommandSet,
+ with_argparser,
)
@@ -44,16 +45,17 @@ class WithCommandSets(Cmd):
# Tab complete from a list using argparse choices. Set metavar if you don't
# want the entire choices list showing in the usage text for this command.
- example_parser.add_argument('--choices', choices=['some', 'choices', 'here'], metavar="CHOICE",
- help="tab complete using choices")
+ example_parser.add_argument(
+ '--choices', choices=['some', 'choices', 'here'], metavar="CHOICE", help="tab complete using choices"
+ )
# Tab complete from choices provided by a choices provider
- example_parser.add_argument('--choices_provider', choices_provider=choices_provider,
- help="tab complete using a choices_provider")
+ example_parser.add_argument(
+ '--choices_provider', choices_provider=choices_provider, help="tab complete using a choices_provider"
+ )
# Tab complete using a completer
- example_parser.add_argument('--completer', completer=Cmd.path_complete,
- help="tab complete using a completer")
+ example_parser.add_argument('--completer', completer=Cmd.path_complete, help="tab complete using a completer")
@with_argparser(example_parser)
def do_example(self, _: argparse.Namespace) -> None: