Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Added PyCharm warning suppressions | Todd Leonhardt | 2020-07-13 | 1 | -0/+2 |
| | |||||
* | small simplification | Todd Leonhardt | 2020-07-13 | 1 | -2/+1 |
| | |||||
* | slight cleanup | Todd Leonhardt | 2020-07-13 | 1 | -2/+2 |
| | |||||
* | Address fact that typing.Deque wasn't defined prior to 3.5.4 | Todd Leonhardt | 2020-07-13 | 1 | -1/+9 |
| | |||||
* | replace pkg_resources with importlib.metadata | Doug Hellmann | 2020-07-12 | 1 | -3/+8 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> | ||||
* | Removed divider row from tab completion hint table | Kevin Van Brunt | 2020-06-01 | 1 | -1/+1 |
| | |||||
* | Optimized imports | Kevin Van Brunt | 2020-06-01 | 1 | -2/+1 |
| | |||||
* | Merge branch 'master' into hint_bug | Kevin Van Brunt | 2020-06-01 | 3 | -29/+53 |
|\ | |||||
| * | Removed pwarning() calls when command raises SystemExit | Kevin Van Brunt | 2020-05-28 | 1 | -2/+0 |
| | | | | | | | | Added unit tests | ||||
| * | Made following changes to onecmd_plus_hooks() | Kevin Van Brunt | 2020-05-07 | 2 | -21/+29 |
| | | | | | | | | | | 1. Added SystemExit handling by warning the user it's occured and setting stop to True 2. KeyboardInterrupts won't be raised if stop is already set to True. | ||||
| * | Added SkipPostcommandHooks exception and made Cmd2ArgparseError inherit from it. | Kevin Van Brunt | 2020-05-07 | 3 | -12/+30 |
| | | | | | | | | Both exception classes have been added to the public API. | ||||
* | | Simplied table divider code for ease of reading | Kevin Van Brunt | 2020-06-01 | 1 | -3/+5 |
| | | |||||
* | | Changed how SimpleTable creates divider when divider_char is wide. It no ↵ | Kevin Van Brunt | 2020-06-01 | 2 | -32/+45 |
| | | | | | | | | longer stretches the width of the table. | ||||
* | | Changed SimpleTable.base_width() to a class method and added equivalent ↵ | Kevin Van Brunt | 2020-05-28 | 1 | -10/+30 |
| | | | | | | | | method to BorderedTable. | ||||
* | | Updated argparse_completer to use TableCreator for the hint table | Kevin Van Brunt | 2020-05-28 | 3 | -31/+80 |
|/ | |||||
* | Added info on semantic versioning and branching strategy to CONTRIBUTING.md | Todd Leonhardt | 2020-04-24 | 8 | -20/+21 |
| | | | | | | | 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 | ||||
* | Completion doc updates | Kevin Van Brunt | 2020-04-23 | 1 | -12/+9 |
| | |||||
* | Documented CompletionError class | Kevin Van Brunt | 2020-04-23 | 1 | -4/+4 |
| | |||||
* | Updated _set_parser_prog() so future calls to add_parser() will set the ↵ | Kevin Van Brunt | 2020-04-23 | 1 | -1/+5 |
| | | | | | | correct prog value This makes dynamically adding subcommands after the CLI starts easier. | ||||
* | Fixed issue where subcommand usage text could contain a subcommand alias ↵ | Kevin Van Brunt | 2020-04-23 | 1 | -5/+20 |
| | | | | instead of the actual name | ||||
* | Merge branch 'master' into table_creator | Kevin Van Brunt | 2020-04-22 | 2 | -16/+43 |
|\ | |||||
| * | run_pyscript now passes a keyword arg to do_py instead of using a hidden ↵ | Kevin Van Brunt | 2020-04-21 | 1 | -9/+8 |
| | | | | | | | | argparse flag | ||||
| * | argument_list and argparse wrappers now pass kwargs through to the wrapped ↵ | Kevin Van Brunt | 2020-04-20 | 1 | -7/+35 |
| | | | | | | | | command function | ||||
* | | Merge branch 'master' into table_creator | Kevin Van Brunt | 2020-04-22 | 3 | -23/+49 |
|\ \ | |/ | |||||
| * | Updated error text | Kevin Van Brunt | 2020-04-20 | 1 | -4/+2 |
| | | |||||
| * | cmd2 now considers ipy a pyscript environment | Kevin Van Brunt | 2020-04-20 | 1 | -8/+17 |
| | | |||||
| * | Consistently use :raises: instead of :raises (make sure there is a trailing ↵ | Todd Leonhardt | 2020-04-20 | 3 | -6/+6 |
| | | | | | | | | colon) | ||||
| * | Fix doc build | Todd Leonhardt | 2020-04-20 | 1 | -1/+1 |
| | | |||||
| * | ipy now returns its PyBridge's stop value so the main loop can know to stop. ↵ | Kevin Van Brunt | 2020-04-20 | 1 | -10/+29 |
| | | | | | | | | This is consistent with the py command. | ||||
* | | Updating documentation for table creation | Kevin Van Brunt | 2020-04-22 | 1 | -3/+5 |
| | | |||||
* | | Updated docs | Kevin Van Brunt | 2020-04-22 | 3 | -14/+17 |
| | | |||||
* | | Updated docstrings to work with sphinx | Kevin Van Brunt | 2020-04-20 | 1 | -10/+12 |
| | | |||||
* | | Added configurable padding to BorderedTable/AlternatingTable | Kevin Van Brunt | 2020-04-19 | 1 | -53/+104 |
| | | | | | | | | Updated comments | ||||
* | | Merge branch 'master' into table_creator | Todd Leonhardt | 2020-04-15 | 3 | -87/+89 |
|\ \ | |/ | |||||
| * | Removed exception handling around tempfile.TemporaryFile() | Kevin Van Brunt | 2020-04-13 | 1 | -5/+1 |
| | | |||||
| * | onecmd_plus_hooks() no longer handles updating any state data related to ↵ | Kevin Van Brunt | 2020-04-12 | 2 | -51/+56 |
| | | | | | | | | | | | | redirection. For simplicity, it's all done in _redirect_output() and _restore_output(). | ||||
| * | Simplfied _redirect_output() by raising exception instead of returning bool | Kevin Van Brunt | 2020-04-11 | 3 | -39/+40 |
| | | |||||
| * | Simplified onecmd_plus_hooks by reducing number of calls to ↵ | Kevin Van Brunt | 2020-04-11 | 1 | -6/+6 |
| | | | | | | | | _run_cmdfinalization_hooks() | ||||
* | | Merge branch 'master' into table_creator | Kevin Van Brunt | 2020-04-11 | 3 | -9/+10 |
|\ \ | |/ | |||||
| * | Made some optional arguments with defaults keyword-only. | Kevin Van Brunt | 2020-04-11 | 3 | -9/+10 |
| | | | | | | | | | | Added unit test for echo argument to pyscript app() command. Removed _relative_load from hidden commands since that command was renamed. | ||||
* | | Initial commit of table creation API | Kevin Van Brunt | 2020-04-09 | 5 | -33/+817 |
|/ | |||||
* | Removed the shebang from cmd2.py which was a hangover from when that file ↵ | Todd Leonhardt | 2020-04-08 | 1 | -1/+0 |
| | | | | formerly had a __main__ | ||||
* | Updated comment | Kevin Van Brunt | 2020-03-26 | 1 | -1/+1 |
| | |||||
* | Since runcode() catches most KeyboardInterrupts, just ignore any that make ↵ | Kevin Van Brunt | 2020-03-26 | 1 | -5/+3 |
| | | | | | | their way up to our code. This is more consistent than raising the rare few that we see. | ||||
* | Ctrl-C now stops a running text script instead of just the current script ↵ | Kevin Van Brunt | 2020-03-26 | 1 | -17/+33 |
| | | | | command | ||||
* | do_shell() now saves the return code of the command it runs in ↵ | Kevin Van Brunt | 2020-03-20 | 1 | -0/+3 |
| | | | | self.last_result for use in pyscripts | ||||
* | Added Cmd2ShlexError | Kevin Van Brunt | 2020-03-12 | 4 | -18/+32 |
| | |||||
* | Changed name of exception class as requested in code review | Kevin Van Brunt | 2020-03-05 | 3 | -7/+7 |
| | |||||
* | Prevent postcmd_hook from running when argparse fails | Kevin Van Brunt | 2020-03-05 | 3 | -10/+15 |
| | |||||
* | Making build_settables() public again | Kevin Van Brunt | 2020-02-28 | 2 | -4/+4 |
| |