summaryrefslogtreecommitdiff
path: root/cmd2/transcript.py
Commit message (Collapse)AuthorAgeFilesLines
* Updated main code to use f-stringsKevin Van Brunt2021-04-131-9/+3
|
* And that's the last of it. Passes mypy.Eric Lin2021-04-061-1/+3
|
* history, py_bridge, transcript now passs mypyEric Lin2021-04-061-14/+14
|
* More mypy validation changes. cmd2.py is nearly fully mypy compliant now.Eric Lin2021-04-021-2/+12
|
* Start making small changes to fix mypy warningsTodd Leonhardt2021-02-211-0/+3
|
* Add in isort changesTodd Leonhardt2021-01-311-1/+3
|
* Add black for automatic code formatTodd Leonhardt2021-01-311-13/+15
|
* Changed isort to force wrapping of imports to reduce merge conflicts from ↵Eric Lin2021-01-221-3/+8
| | | | minor import changes.
* Changed allow_ansi to allow_style for accuracy in what types of ANSI escape ↵Kevin Van Brunt2019-12-191-4/+4
| | | | sequences are handled
* Moved code related to ANSI escape codes to new file called ansi.pyKevin Van Brunt2019-06-261-5/+5
|
* Updated CHANGELOG and slightly refactored/reorganized comments and code in ↵Todd Leonhardt2019-06-161-15/+15
| | | | transcript.py
* Made comment more accurateKevin Van Brunt2019-06-071-1/+1
|
* Refactored how and when transcript file glob patterns are expanded in order ↵Todd Leonhardt2019-06-061-8/+4
| | | | to present a better error message to user
* Transcript testing now properly handles commands which signal the ↵Todd Leonhardt2019-06-061-3/+9
| | | | | | application to quit Implemented an antediluvian TODO
* Refactor exit_code implementationTodd Leonhardt2019-05-201-0/+1
| | | | | | | | | | | | cmd2.Cmd.cmdloop() now returns self.exit_code which should be an integer Also: - Refactored examples to call sys.exit(app.cmdloop()) in their __main__ - Running transcript tests now sets the exit_code accordingly based on success/failure - Updated CHANGELOG - Updated README - Updated Sphinx docs - Added unit test for case when transcript test fails
* Fix flake8 issuesTodd Leonhardt2018-12-061-7/+8
| | | | | | | | | | | | | | | | | | | | | | This commit contains a very large number of trivial changes in order to fix flake8 errors and warnings. Predominantly these are whitespace changes. Additionally, the build for Python 3.7 on TravisCI has been tweaked to fail if there are any flake8 errors using the following commandline: * flake8 . --count --ignore=E252 --max-complexity=31 --max-line-length=127 --show-source --statistics NOTE: In the future the max cyclomatic complexity should be lowered, but some improvements need to be made first. One flake8 error is being ignored entirely: * E252 missing whitespace around parameter equals * ignored because it doesn't correctly deal with default argument values after a type hint A few flake8 errors are being selectively ignored in certain files: * C901 fuction is too complex * ignored in argparse_completer.py because the complex code is an override of argparse complexity * E302 expected 2 blank lines after ... * ignored in all unit test files for convenience * F401 module imported but unused * ignored in cmd2/__init__.py because imports are for convenience of cmd2 developers and backwards compatibility * F821 undefined name * ignored in cmd2 script files which are intended to run only within cmd2 applications via pyscript where "app" and "cmd" are defined
* Refactored filtering in path_complete to use a functionKevin Van Brunt2018-10-261-1/+1
|
* Fixed transcript testing bug where last command in transcript has no ↵Todd Leonhardt2018-09-301-1/+4
| | | | | | | expected output Also: - Added unit test for this specific case
* Fixed several hack classes build to simulate file descriptorsTodd Leonhardt2018-09-231-22/+1
| | | | | | | | | Now there is a single class, StdSim in utils.py, which is intended to simulate stdout and stderr file objects. This class replaced the following: - pyscript_bridge.py::CopyStream - transcript.py::OutputTrap - conftest.py::StdOut
* This just fixes a couple minor lint warnings related to raw strings and escapesTodd Leonhardt2018-09-131-1/+1
|
* Working on improving type hintingTodd Leonhardt2018-06-091-10/+8
| | | | | Also: - Refactored perror() to remove a rarely used optional argument which was unecessary
* Make changes requested in PR #413kotfu2018-05-241-7/+22
|
* Defer import of unittestkotfu2018-05-061-0/+213