summaryrefslogtreecommitdiff
path: root/cmd2/command_definition.py
Commit message (Collapse)AuthorAgeFilesLines
* More things to make mypy happy.Eric Lin2021-04-021-5/+10
|
* Resolves comments from PREric Lin2021-03-181-5/+8
|
* Each CommandSet's settables are defined separately. cmd2.Cmd searches all ↵Eric Lin2021-03-181-0/+40
| | | | | | | | registered CommandSets for settables. Settables can now set any attribute on any object passed to it. The name the user sees may be set to a different value than what the actual attribute is. Cmd2 will now aggregate all settables on the cmd2.Cmd instance with each installed CommandSet.
* Deprecate Python 3.5Todd Leonhardt2021-02-201-1/+1
|
* Add in isort changesTodd Leonhardt2021-01-311-4/+13
|
* Add black for automatic code formatTodd Leonhardt2021-01-311-6/+9
|
* Changed isort to force wrapping of imports to reduce merge conflicts from ↵Eric Lin2021-01-221-4/+12
| | | | minor import changes.
* Changes default category to be heritable by default - meaning that ↵Eric Lin2020-09-111-3/+21
| | | | | | subclasses will inherit the parent class's default category. Adds optional flag to disable heritability.
* Added CommandSet.on_unregistered()Kevin Van Brunt2020-09-031-7/+14
|
* Added on_registered() callback to CommandSetKevin Van Brunt2020-09-011-2/+9
|
* When passing a ns_provider to an argparse command, will now attempt to ↵Eric Lin2020-08-121-2/+1
| | | | resolve the correct CommandSet instance for self. If not, it'll fall back and pass in the cmd2 app
* Breaking change: Removed cmd2 app as a required second parameter toEric Lin2020-08-121-33/+2
| | | | | | CommandSet command functions (do_, complete_, help_). Renamed install_command_set and uninstall_command_set to register_command_set and unregister_command_set.
* Will now traverse down CommandSet inheritance tree to find all leaf descendants.1.3.2Eric Lin2020-08-101-1/+5
| | | | | | CommandSet now has a check to ensure it is only registered with one cmd2.Cmd instance at a time. Adds function to find command set by type and by command name
* updated importsEric Lin2020-08-041-1/+1
| | | | Added additional documentation
* Removed support for functions outside of CommandSetsEric Lin2020-08-041-25/+0
|
* Sort imports using isortTodd Leonhardt2020-08-041-7/+2
|
* Appears to be a type hinting olution that works for flake, sphinx, and PyCharmEric Lin2020-08-041-8/+11
|
* Added more command validation. Moved some common behavior into private ↵Eric Lin2020-08-041-1/+1
| | | | functions.
* Fixes to sphinx generationEric Lin2020-08-041-1/+1
|
* Fixes issue with locating help_ annd complete_ functions when autoloading ↵Eric Lin2020-08-041-21/+8
| | | | | | command functions Adds handling of some edge cases. More thorough test coverage.
* add ability to remove commands and commandsetsEric Lin2020-08-041-1/+8
| | | | Issue #943
* Some minor cleanup of how imports work. Fixed issue with help documentation ↵Eric Lin2020-08-041-3/+18
| | | | | | for CommandSet commands. Issue #943
* Initial implementation of modular command loadingEric Lin2020-08-041-0/+122
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.