| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Start deprecation of Python 3.6
* Removed dependency on attrs and replaced with dataclasses
* Fix typing
* Added comments to assist with dropping support of Python versions in the future.
---------
Co-authored-by: Kevin Van Brunt <kmvanbrunt@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use latest version of mypy and fix type hinting accordingly
Also:
- Update Pipfile to never require mock since we only support Python 3.6+
- Remove Azure Pipelines badge from Readme and fix section links there
- Added an "inv format" task to run black and isort to auto-format all code before a commit
* Try to fix type errors on versions prior to 3.8
* Restored correct types in argparse_custom.py
|
|
|
|
|
|
|
|
|
| |
numbers.
Completion hint tables now right-align the left column if the hints have a numerical type.
Fixed issue introduced in 2.3.0 with AlternatingTable, BorderedTable, and SimpleTable that caused
header alignment settings to be overridden by data alignment settings.
|
| |
|
| |
|
|
|
|
| |
Added unit tests for custom ArgparseCompleter
|
|
|
|
|
|
| |
using methods on ArgumentParser objects.
This fixes issue where subcommands did not use the correct custom ArgparseCompleter type.
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
extend and modify the
behavior of `ArgparseCompleter`.
* New function `register_argparse_argument_parameter()` allows developers to specify custom
parameters to be passed to the argparse parser's `add_argument()` method. These parameters will
become accessible in the resulting argparse Action object when modifying `ArgparseCompleter` behavior.
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| | |
2.1.2
|
|/
|
|
|
|
|
| |
Tabled tab completion now includes divider row.
Tab completion results for aliases, macros, and Settables wrap long fields.
SimpleTable now accepts blank for the divider character. It is identical to passing None.
Removed --verbose flag from set command so the descriptions always show.
|
|
|
|
|
|
| |
class.
Deprecated set_choices_provider() and set_completer() functions in favor of these new methods.
|
|
|
|
| |
Python 3.10
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
# 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
|
| |\ |
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
# Conflicts:
# CHANGELOG.md
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
choices_providers.
Added unit tests for this case.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
| |_|_|/
|/| | | |
|
| |_|/
|/| |
| | |
| | | |
minor import changes.
|
| |/
|/|
| |
| |
| |
| | |
the @as_subcommand_to
decorator resulted in duplicated help text in the base command the subcommands belong to.
|
|/
|
|
|
|
|
| |
are now
Cmd2AttributeWrapper objects named cmd2_statement and cmd2_handler. This makes it
easy to filter out which attributes in an argparse.Namespace were added by cmd2.
|
|
|
|
| |
its metavar
|
|
|
|
|
|
| |
CommandSet command functions (do_, complete_, help_).
Renamed install_command_set and uninstall_command_set to
register_command_set and unregister_command_set.
|
|
|
|
| |
passing to command handlers to access sub-command handlers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
through to the ArgparseCompleter if one is registered.
For subcommands, the registered argparse instance for the subcommand is now tagged with the
CommandSet from which it originated.
If a CommandSet is detected, it's now passed in as 'self' for the
completion functions.
Fixes some issue found with removing a subcommand.
Adds additional tests.
Added a check to prevent removal of a CommandSet if it has commands with sub-commands
from another CommandSet bound to it.
Documentation improvements.
Standardized around using CommandSetRegistrationException during commandset install/uninstall related errors.
Added support for nested sub-command injection.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
sub-commande => subcommand
Added help/aliases to `as_subcommand_to` decorator.
|
|
|
|
|
|
| |
load/unload.
Updated examples and documentation to include discussion of injectable
sub-commands.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Also:
- Added isort to Pipenv dev
- Added setup.cfg to make it easy to run flake8, doc8, and isort directly from the command line without using invoke
- Ran isort to sort includes
|
| |
|