diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2022-07-14 12:59:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-14 12:59:16 -0400 |
commit | e95af81acb9c6829c969f76e40658356a4808edb (patch) | |
tree | b728a33789c33cae913abb16b8d40ee2dd6ff7cf /tasks.py | |
parent | f38194860572c32c4c1f475b16a901eb832d34e6 (diff) | |
download | cmd2-git-e95af81acb9c6829c969f76e40658356a4808edb.tar.gz |
Use latest version of mypy and fix type hinting accordingly (#1239)
* 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
Diffstat (limited to 'tasks.py')
-rw-r--r-- | tasks.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -353,3 +353,14 @@ def flake8(context): namespace.add_task(flake8) + + +# Black and isort auto-formatting +@invoke.task() +def format(context): + """Run black and isort auto-formatting for code style enforcement""" + with context.cd(TASK_ROOT_STR): + context.run("black . && isort .") + + +namespace.add_task(format) |