diff options
author | Eric Lin <anselor@gmail.com> | 2021-01-05 11:29:39 -0500 |
---|---|---|
committer | anselor <anselor@gmail.com> | 2021-01-22 10:40:50 -0500 |
commit | a3b1b6ddf81cdc0b253f15feeb167ff348afd14f (patch) | |
tree | 2556f4aa57d02e12526949c08cf032c3e1a67d11 /examples/modular_commands_main.py | |
parent | c1859045c8d439932fac9ceb5203a400db609533 (diff) | |
download | cmd2-git-a3b1b6ddf81cdc0b253f15feeb167ff348afd14f.tar.gz |
Changed isort to force wrapping of imports to reduce merge conflicts from minor import changes.
Diffstat (limited to 'examples/modular_commands_main.py')
-rw-r--r-- | examples/modular_commands_main.py | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/examples/modular_commands_main.py b/examples/modular_commands_main.py index b698e00f..2c652f22 100644 --- a/examples/modular_commands_main.py +++ b/examples/modular_commands_main.py @@ -5,13 +5,33 @@ A complex example demonstrating a variety of methods to load CommandSets using a with examples of how to integrate tab completion with argparse-based commands. """ import argparse -from typing import Dict, Iterable, List, Optional - -from cmd2 import Cmd, Cmd2ArgumentParser, CommandSet, CompletionItem, with_argparser -from cmd2.utils import CompletionError, basic_complete -from modular_commands.commandset_basic import BasicCompletionCommandSet # noqa: F401 -from modular_commands.commandset_complex import CommandSetA # noqa: F401 -from modular_commands.commandset_custominit import CustomInitCommandSet # noqa: F401 +from typing import ( + Dict, + Iterable, + List, + Optional, +) + +from cmd2 import ( + Cmd, + Cmd2ArgumentParser, + CommandSet, + CompletionItem, + with_argparser, +) +from cmd2.utils import ( + CompletionError, + basic_complete, +) +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 +) # Data source for argparse.choices food_item_strs = ['Pizza', 'Ham', 'Ham Sandwich', 'Potato'] |