summaryrefslogtreecommitdiff
path: root/cmd2
Commit message (Collapse)AuthorAgeFilesLines
* Make sys.stdout check clearer.HEADmasterAndrew Clark IV2023-05-021-1/+1
|
* Simplify sys.stdout checkAndrew Clark IV2023-05-021-37/+36
|
* Check if sys.stdout is NoneAndrew Clark IV2023-05-021-36/+37
|
* rl_utils: Verify `readline.__doc__ is not None`netanelc3052023-05-021-1/+1
|
* format cleanupkotfu2023-02-011-1/+0
|
* Merge branch 'master' into clipboardkotfu2023-02-017-65/+46
|\ | | | | | | | | # Conflicts: # CHANGELOG.md
| * Deprecate support for Python 3.6 and remove dependency on attrs (#1257)Todd Leonhardt2023-01-317-65/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | Fix import formattingkotfu2023-01-301-0/+1
| |
* | Remove erroneously introduced importkotfu2023-01-281-1/+0
| |
* | Add allow_clipboard for #1225kotfu2023-01-282-36/+24
|/
* Fixed mypy and flake8 errors.Kevin Van Brunt2023-01-272-3/+5
|
* Fixed ValueError caused when passing Cmd.columnize() strings wider than ↵Kevin Van Brunt2023-01-271-1/+2
| | | | display_width.
* Fix black errorskotfu2022-11-051-1/+1
|
* Update type hints and comments on to_bool()kotfu2022-11-051-5/+8
|
* Enhance str_to_bool() to accept other typeskotfu2022-11-051-4/+8
| | | | | - Rename str_to_bool() -> to_bool() - Enhance to_bool() so that it accepts and converts bool, int, and float in addition to str
* Use latest version of mypy and fix type hinting accordingly (#1239)Todd Leonhardt2022-07-143-8/+9
| | | | | | | | | | | | * 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
* Moved documentation annotation stripping into utility function. Changed ↵Eric Lin2022-04-253-18/+32
| | | | argparse decorator to automatically strip annotations.
* async_alert() raises a RuntimeError if called from the main thread.Kevin Van Brunt2022-04-131-11/+24
|
* Fixed value for ansi.Bg.YELLOWKevin Van Brunt2022-04-131-1/+1
|
* Fixed spelling in a docstringKevin Van Brunt2022-02-241-1/+1
|
* Reduced amount of style characters carried over from previous lines when ↵Kevin Van Brunt2022-02-224-40/+147
| | | | | | | aligning text. Also reduced amount of style characters appended to truncated text. These changes were made to reduce memory usage in certain use cases of tables (e.g. nested colored tables).
* cmd2 now uses pyreadline3 when running any version of Python on WindowsKevin Van Brunt2022-02-172-12/+11
|
* Improved some readline-related commentsKevin Van Brunt2022-02-172-8/+25
|
* Deleted cmd2.fg and cmd2.bg which were deprecated in 2.3.0. Use cmd2.Fg and ↵Kevin Van Brunt2022-02-172-71/+0
| | | | cmd2.Bg instead.
* Fixed issue where tab completion was quoting argparse flags in some cases.Kevin Van Brunt2022-02-162-33/+38
|
* Added PassThroughException to __init__.py imports. (#1194)Kevin Van Brunt2022-01-261-1/+7
| | | Co-authored-by: Todd Leonhardt <todd.leonhardt@gmail.com>
* Fixed issue in ansi.async_alert_str() which would raise IndexError if prompt ↵Kevin Van Brunt2022-01-171-1/+1
| | | | was blank. (#1188)
* Added 'no cover' pragma to importKevin Van Brunt2021-12-151-1/+1
|
* Simplified importKevin Van Brunt2021-12-151-12/+3
|
* Added broader exception handling when enabling clipboard functionality via ↵Kevin Van Brunt2021-12-152-7/+9
| | | | pyperclip.
* Added clearer exception handling to BorderedTable and SimpleTableKevin Van Brunt2021-11-241-1/+9
|
* Fixed issue where a ns_provider could be passed None instead of its correct ↵2.3.2Kevin Van Brunt2021-11-222-5/+4
| | | | cmd2.Cmd or CommandSet value.
* Updated docstring2.3.1Kevin Van Brunt2021-11-181-2/+3
|
* ArgparseCompleter now sorts CompletionItems created with numerical values as ↵Kevin Van Brunt2021-11-183-31/+59
| | | | | | | | | 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 ability to use CompletionItems as argparse choicesKevin Van Brunt2021-11-181-7/+58
|
* Added ability to set border background color on BorderTables and ↵Kevin Van Brunt2021-11-101-37/+46
| | | | AlternatingTables
* Added type checks to ansi.style()Kevin Van Brunt2021-10-271-0/+6
|
* Updated table example.Kevin Van Brunt2021-10-261-17/+17
| | | | | | Renamed Column settings: override_header_style -> style_header_text override_data_style -> style_data_text
* Added ability to colorize all aspects of SimpleTablesKevin Van Brunt2021-10-251-15/+74
|
* Fixed regression in Cmd.select converting "Any" type argument to stringBenjamin George Roberts2021-10-251-2/+2
|
* Added ability to colorize all aspects of BorderedTables and AlternatingTables.Kevin Van Brunt2021-10-194-104/+168
| | | | Refactored utils.align_text() to print less fill_char style characters.
* Added support for 8-bit/256-colors with the cmd2.EightBitFg and ↵Kevin Van Brunt2021-10-186-233/+1024
| | | | | | | | | | | | | | cmd2.EightBitBg classes. Added support for 24-bit/RGB colors with the cmd2.RgbFg and cmd2.RgbBg classes. Removed dependency on colorama. Deprecated cmd2.fg. Use cmd2.Fg instead. Deprecated cmd2.bg. Use cmd2.Bg instead. Changed type of ansi.allow_style from a string to an ansi.AllowStyle Enum class. Fixed bug where using choices on a Settable didn't verify that a valid choice had been entered.
* Added settings to Column class which prevent a table from overriding ↵Kevin Van Brunt2021-10-131-7/+32
| | | | | | | | | | existing styles in header and/or data text. These were added to support nesting an AlternatingTable within an AlternatingTable, but other custom table classes can also use these settings. AlternatingTable no longer applies background color to outer borders. This was done to improve appearance since the background color extended beyond the borders of the table.
* Fixed AttributeError in rl_get_prompt() when prompt is None.Kevin Van Brunt2021-10-112-26/+18
|
* Updated thread nameKevin Van Brunt2021-09-241-1/+1
|
* Updated async_alert() to account for self.prompt not matching Readline's ↵Kevin Van Brunt2021-09-142-30/+70
| | | | current prompt.
* Argparse tab completer will complete remaining flag names if there are no ↵Kevin Van Brunt2021-09-071-3/+4
| | | | more positionals to complete.
* Updating docsKevin Van Brunt2021-09-011-0/+2
|
* Added cmd2.Cmd method to determine what ArgparseCompleter type to useKevin Van Brunt2021-09-012-21/+22
|
* Added ap_completer_type arg to Cmd2ArgumentParser.__init__().Kevin Van Brunt2021-09-012-1/+12
| | | | Added unit tests for custom ArgparseCompleter