summaryrefslogtreecommitdiff
path: root/tests/test_argparse_completer.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed issue where argparse choices could not be CompletionItemsKevin Van Brunt2021-03-021-0/+19
|
* Added support for ANSI styles and newlines in tab completion resultsKevin Van Brunt2021-03-021-9/+14
|
* Fixed black, isort, flake8, and doc8 issuesTodd Leonhardt2021-02-191-134/+136
|
* Merge branch 'master' into blackTodd Leonhardt2021-02-191-208/+215
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # 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-4/+17
| |\
| * \ Merge branch '2.0' into read_inputKevin Van Brunt2020-09-091-26/+44
| |\ \
| | * \ Merge branch 'master' into 2.0Kevin Van Brunt2020-09-091-26/+44
| | |\ \
| * | \ \ Merge branch '2.0' into read_inputKevin Van Brunt2020-09-051-34/+70
| |\ \ \ \ | | |/ / /
| | * | | Merge branch 'master' into 2.0Kevin Van Brunt2020-09-051-34/+70
| | |\ \ \
| * | | | | Refactored ArgparseCompleter to support custom completionKevin Van Brunt2020-09-011-6/+6
| |/ / / /
| * | | | Documented support for standalone functions being used as completers and ↵Kevin Van Brunt2020-08-181-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | choices_providers. Added unit tests for this case.
| * | | | Replaced choices_function / choices_method with choices_provider.Kevin Van Brunt2020-08-131-114/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-7/+21
| | | | |
* | | | | Add black for automatic code formatTodd Leonhardt2021-01-311-361/+435
| |_|_|/ |/| | |
* | | | Changed isort to force wrapping of imports to reduce merge conflicts from ↵Eric Lin2021-01-221-4/+18
| |_|/ |/| | | | | | | | minor import changes.
* | | argparse tab completion now groups flag names which run the same action. ↵Kevin Van Brunt2020-09-091-26/+44
| |/ |/| | | | | | | | | Optional flags are wrapped in brackets like it is done in argparse usage text.
* | Added always_show_hint settingKevin Van Brunt2020-09-051-11/+45
|/ | | | Fixed issue where flag names weren't always sorted correctly in argparse tab completion
* Fixed tab completion bug when using CompletionItem on an argument whose ↵Kevin Van Brunt2020-08-131-5/+73
| | | | metavar is a tuple
* Added info on semantic versioning and branching strategy to CONTRIBUTING.mdTodd Leonhardt2020-04-241-2/+3
| | | | | | | 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
* Added apply_style to CompletionErrorKevin Van Brunt2020-02-181-39/+0
| | | | Simplified error class structure in argparse_completer.py
* Fixed issue where argparse completion errors were being rewrapped as ↵Kevin Van Brunt2020-02-181-1/+41
| | | | _ActionCompletionError in some cases
* Updated unit testKevin Van Brunt2020-02-171-2/+5
|
* Made CompletionError exception available to non-argparse tab completionKevin Van Brunt2020-02-171-2/+2
|
* Renamed AutoCompleter to ArgparseCompleter for clarityKevin Van Brunt2020-02-171-12/+12
|
* Increased code coverage in argparse_completer.py back to 100%Kevin Van Brunt2019-12-101-2/+2
|
* Removed all instances where a parser's prog attribute was being set since ↵Kevin Van Brunt2019-10-301-1/+1
| | | | this is no longer needed
* Added commentKevin Van Brunt2019-09-301-1/+1
|
* Wrote unit testsKevin Van Brunt2019-09-301-9/+72
|
* Simplifying tab completion message printingKevin Van Brunt2019-09-301-19/+1
|
* Added unit tests for CompletionErrorKevin Van Brunt2019-09-231-1/+41
|
* Fixed unit tests on Python versions older than 3.7Kevin Van Brunt2019-09-161-3/+3
|
* Added unit test to override a parameter in a parent parserKevin Van Brunt2019-09-161-0/+6
|
* Updated arg_tokens unit testsKevin Van Brunt2019-09-161-50/+15
|
* Changed arg_tokens to a dictionaryKevin Van Brunt2019-09-161-9/+9
| | | | Including tokens from parent parsers in arg_tokens when subcommands are used
* Fixed issue where invalid subcommand token was ignored when tab completing helpKevin Van Brunt2019-09-131-0/+1
|
* Increased code coverageKevin Van Brunt2019-09-131-1/+2
|
* Added unit tests for arg_tokensKevin Van Brunt2019-09-131-0/+57
|
* AutoCompleter only passes parsed_args to choices/completer functions that ↵Kevin Van Brunt2019-08-271-5/+5
| | | | have an argument called 'parsed_args'
* AutoCompleter now passes parsed_args to all choices and completer functionsKevin Van Brunt2019-08-221-5/+5
|
* Replaced AutoCompleter._positional_completers since an ArgumentParser can ↵Kevin Van Brunt2019-08-121-1/+1
| | | | | | only have one level of subcommands No longer creating AutoCompleters for all subcommands each time tab is pressed
* Fixed unit testsKevin Van Brunt2019-07-201-6/+15
|
* Changed all uses of sub-command to subcommandKevin Van Brunt2019-07-191-4/+4
|
* Renamed ArgParser to Cmd2ArgumentParser to make it clear it's a derived ↵Kevin Van Brunt2019-07-181-12/+12
| | | | | | class of argparse.ArgumentParser when developers read the code in cmd2.py.
* Added unit tests to cover invalid subcommand names in completionsKevin Van Brunt2019-07-161-1/+24
|
* Renamed matches_sort_key to default_sort_key and using it to sort additional dKevin Van Brunt2019-07-151-7/+7
|
* Added ability to specify nargs ranges with no upper boundKevin Van Brunt2019-07-151-9/+2
|
* Made a few module functions protectedKevin Van Brunt2019-07-151-18/+18
|
* Added more hint unit testsKevin Van Brunt2019-07-121-29/+46
|
* Simplified unit testsKevin Van Brunt2019-07-121-19/+3
|
* More unit testsKevin Van Brunt2019-07-121-0/+3
|