From 486b8c726a7d657ef320e68598077c31fa664790 Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Fri, 19 Feb 2021 21:40:15 -0500 Subject: Fixed black, isort, flake8, and doc8 issues --- examples/modular_commands_main.py | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'examples/modular_commands_main.py') 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: -- cgit v1.2.1