summaryrefslogtreecommitdiff
path: root/examples/modular_commands/commandset_basic.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into blackTodd Leonhardt2021-02-191-3/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # cmd2/__init__.py # cmd2/argparse_completer.py # cmd2/argparse_custom.py # cmd2/cmd2.py # cmd2/decorators.py # cmd2/exceptions.py # cmd2/utils.py # examples/arg_decorators.py # examples/argparse_completion.py # examples/modular_commands_main.py # tests/test_argparse_completer.py # tests/test_argparse_custom.py # tests/test_cmd2.py # tests/test_completion.py # tests/test_history.py
| * Merge branch 'master' into 2.0Kevin Van Brunt2021-01-221-3/+12
| |\
| * | Replaced choices_function / choices_method with choices_provider.Kevin Van Brunt2020-08-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced completer_function / completer_method with completer. ArgparseCompleter now always passes cmd2.Cmd or CommandSet instance as the self argument to choices_provider and completer functions. Moved basic_complete from utils into cmd2.Cmd class. Moved CompletionError to exceptions.py
* | | Add in isort changesTodd Leonhardt2021-01-311-2/+6
| | |
* | | Add black for automatic code formatTodd Leonhardt2021-01-311-34/+25
| |/ |/|
* | Changed isort to force wrapping of imports to reduce merge conflicts from ↵Eric Lin2021-01-221-4/+14
|/ | | | minor import changes.
* Breaking change: Removed cmd2 app as a required second parameter toEric Lin2020-08-121-5/+5
| | | | | | CommandSet command functions (do_, complete_, help_). Renamed install_command_set and uninstall_command_set to register_command_set and unregister_command_set.
* Updates the example to remove usage of the now remove ability toEric Lin2020-08-041-30/+1
| | | | | | | | | | register arbitrary functions as commands. Added example that demonstrates use of each of the command decorators with CommandSets. Adds unit test that verifies that CommandSets containing decorators load and process commands correctly. Updated the constructor declaration for Cmd2ArgumentParser to explicitly re-declare argparse constructor parameters.
* Sort imports using isortTodd Leonhardt2020-08-041-1/+1
|
* Fixes issue with locating help_ annd complete_ functions when autoloading ↵Eric Lin2020-08-041-0/+17
| | | | | | command functions Adds handling of some edge cases. More thorough test coverage.
* Some minor cleanup of how imports work. Fixed issue with help documentation ↵Eric Lin2020-08-041-2/+1
| | | | | | for CommandSet commands. Issue #943
* Initial implementation of modular command loadingEric Lin2020-08-041-0/+105
Issue #943 New class CommandSet can be used to tag a class as a command class. If the constructor is simple, the object will automatically be instantiated and loaded. New register_command decorator to tag any arbitrary function as a command.