summaryrefslogtreecommitdiff
path: root/examples/modular_commands_main.py
Commit message (Collapse)AuthorAgeFilesLines
* Adds pre-commit config to run various lintersci_improvementsxNinjaKittyx2020-12-151-27/+33
| | | | | | | This ads black, isort, pyupgrade, and flake8 to pre-commit-config.yaml There are also some small changes to travis.yml and tasks.py to reduce some repeated configurations that should be consolidated into setup.cfg. Most other changes are automated by the linter scripts.
* updated importsEric Lin2020-08-041-2/+3
| | | | Added additional documentation
* Updates the example to remove usage of the now remove ability toEric Lin2020-08-041-0/+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.
* cleanupEric Lin2020-08-041-7/+7
|
* Initial implementation of modular command loadingEric Lin2020-08-041-0/+127
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.