summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed issue where we attempted to remove CommandSet from a list it was not inKevin Van Brunt2020-08-041-1/+2
|
* Fixed typo in documentationKevin Van Brunt2020-08-041-3/+3
|
* Removed sub-class and instead patch argparse._SubParsersActionEric Lin2020-08-043-28/+30
|
* Suggested PR Fixes.Eric Lin2020-08-047-36/+44
| | | | | sub-commande => subcommand Added help/aliases to `as_subcommand_to` decorator.
* Adds unit tests for sub-commands and additional commandset edge casesEric Lin2020-08-042-12/+187
|
* Adds support for injectable subcommands as part of CommandSetEric Lin2020-08-047-8/+396
| | | | | | load/unload. Updated examples and documentation to include discussion of injectable sub-commands.
* updated importsEric Lin2020-08-0422-48/+374
| | | | Added additional documentation
* Updates the example to remove usage of the now remove ability toEric Lin2020-08-046-66/+154
| | | | | | | | | | 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.
* Removed support for functions outside of CommandSetsEric Lin2020-08-044-308/+13
|
* Moved commandset tests into an isolated testEric Lin2020-08-044-2/+208
|
* added additional documentation for new decorator behaviorEric Lin2020-08-041-3/+24
|
* Added an additional check for isinstance(method, Callable) since there are ↵Eric Lin2020-08-041-1/+2
| | | | scenarios where inspect.ismethod() fails for some reason
* Adjusted decorators to accept variable positional parametersEric Lin2020-08-041-18/+41
|
* cleanupEric Lin2020-08-041-7/+7
|
* Sort imports using isortTodd Leonhardt2020-08-044-14/+6
|
* 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-043-36/+101
| | | | functions.
* Added explicit tests for dir and setattr. Minor type hinting changesEric Lin2020-08-041-0/+24
|
* Fixes to sphinx generationEric Lin2020-08-044-2/+8
|
* Fixes issue with locating help_ annd complete_ functions when autoloading ↵Eric Lin2020-08-044-36/+188
| | | | | | command functions Adds handling of some edge cases. More thorough test coverage.
* add ability to remove commands and commandsetsEric Lin2020-08-044-8/+148
| | | | Issue #943
* Added new constructor parameter to flag whether commands should autoload. ↵Eric Lin2020-08-042-31/+169
| | | | | | Added unit tests. Moved installing commands into separate functions that can be called Issue #943
* Some minor cleanup of how imports work. Fixed issue with help documentation ↵Eric Lin2020-08-046-14/+34
| | | | | | for CommandSet commands. Issue #943
* Initial implementation of modular command loadingEric Lin2020-08-046-2/+451
| | | | | | | | | | 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.
* Added 'no cover' for code block which cannot be tested in our unit testsKevin Van Brunt2020-08-031-1/+1
|
* Added type annotations for fields in cmd2.Cmd.Eric Lin2020-07-219-45/+66
| | | | | | | Cleaned up docstring in external test plugin Updated some initialization to match new approach for version info discovery. Tagged some IDE-only lines as no-cover Adds plugin coverage reporting.
* Merge pull request #959 from python-cmd2/doc_fixKevin Van Brunt2020-07-172-13/+13
|\ | | | | Fixed hook documentation
| * Fixed hook documentationKevin Van Brunt2020-07-172-13/+13
|/
* Updated release date for 1.2.1 in CHANGELOG1.2.1Todd Leonhardt2020-07-141-2/+2
|
* Brought in cmd2 plugin template as a first-class member of cmd2 properEric Lin2020-07-1417-16/+900
|
* Merge pull request #956 from python-cmd2/importlib-metadataTodd Leonhardt2020-07-132-1/+5
|\ | | | | Fix a dependency version requirement which was too restrictive
| * Fix a dependency version requirement which was too restrictive and required ↵Todd Leonhardt2020-07-132-1/+5
|/ | | | bleeding edge for no good reason
* Updated CHANGELOGTodd Leonhardt2020-07-131-0/+2
|
* Merge pull request #955 from python-cmd2/typing_deque1.2.0Todd Leonhardt2020-07-132-1/+11
|\ | | | | Fix compatibility with Python 3.5 versions prior to 3.5.4
| * Added PyCharm warning suppressionsTodd Leonhardt2020-07-131-0/+2
| |
| * small simplificationTodd Leonhardt2020-07-131-2/+1
| |
| * slight cleanupTodd Leonhardt2020-07-131-2/+2
| |
| * Address fact that typing.Deque wasn't defined prior to 3.5.4Todd Leonhardt2020-07-132-1/+10
|/
* Update release date in CHANGELOGTodd Leonhardt2020-07-131-1/+1
|
* Updated CHANGELOGTodd Leonhardt2020-07-121-0/+6
|
* Merge pull request #953 from dhellmann/drop-pkg-resourcesTodd Leonhardt2020-07-124-12/+22
|\ | | | | replace pkg_resources with importlib.metadata
| * replace pkg_resources with importlib.metadataDoug Hellmann2020-07-124-12/+22
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Importing pkg_resources has a side-effect of scanning every installed distribution on sys.path to load the metadata, especially the entry points defined in the packages. This can have a significant launch-time cost for command line applications when there are a lot of distributions to scan. Since cmd2 is only using pkg_resources to find the version of the installed package, pkg_resources can be replaced with importlib.metadata. The implementation in the new library is significantly faster because it goes immediately to the metadata file for the requested distribution, instead of scanning all of them. There are also no import-time side-effects. importlib.metadata is a new standard library module starting with python 3.8. For earlier versions, a compatible library has been released to PyPI as 'importlib_metadata'. This change adds the new dependency with a qualifier so that it is only applied to older versions of python, and then updates the places that were importing pkg_resources to look for the different versions of the new library instead. The documentation configuration is changed to import cmd2 itself to get its version, since the package has to be installed for the metadata to be available anyway. Signed-off-by: Doug Hellmann <doug@doughellmann.com>
* Ran isortTodd Leonhardt2020-07-117-6/+7
|
* Minor cleanup. Removed some experiments that weren't supposed to be includedEric Lin2020-07-115-28/+13
|
* external test plugin tests and coverage should now runEric Lin2020-07-1118-124/+125
|
* Copied cmd2 ext test into cmd2 baseline and linked up invokeEric Lin2020-07-1115-15/+817
|
* Swap out tox for noxEric Lin2020-07-089-106/+246
|
* Fixed command finalization exampleKevin Van Brunt2020-07-071-1/+1
|
* Merge pull request #947 from python-cmd2/pyscript_docsTodd Leonhardt2020-07-035-4/+118
|\ | | | | Further additions to pyscript documenntation for Issue #644
| * Move line that seemed out of place at the very end to before the "advanced" ↵Todd Leonhardt2020-06-271-3/+3
| | | | | | | | section