diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-06-10 16:26:04 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-06-10 16:26:04 -0400 |
commit | 608e290c43510dff1cc7256816f1dd242f77a607 (patch) | |
tree | 5bbe4bae072111bf7209701a36d5d39f050fc9ef /tasks.py | |
parent | 6c2b3193b1d99aaa183fdde8f9bcf5288522d854 (diff) | |
download | cmd2-git-608e290c43510dff1cc7256816f1dd242f77a607.tar.gz |
Added invoke commands for running mypy and cleaning up after it
Diffstat (limited to 'tasks.py')
-rw-r--r-- | tasks.py | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -54,6 +54,21 @@ def pytest_clean(context): namespace_clean.add_task(pytest_clean, 'pytest') @invoke.task +def mypy(context): + "Run mypy optional static type checker" + context.run("mypy main.py") + namespace.add_task(mypy) +namespace.add_task(mypy) + +@invoke.task +def mypy_clean(context): + "Remove mypy cache directory" + #pylint: disable=unused-argument + dirs = ['.mypy_cache'] + rmrf(dirs) +namespace_clean.add_task(mypy_clean, 'mypy') + +@invoke.task def tox(context): "Run unit and integration tests on multiple python versions using tox" context.run("tox") |