diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-06-11 10:37:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-11 10:37:47 -0400 |
commit | 44282fa49b2db9e4de7dc2f08e4d60e8b2be145f (patch) | |
tree | 8ceeddb81ff1a660e1ada5ba55f379968f23bfb6 /tasks.py | |
parent | 2565ae7832edfe42ee7631473f67a09b6789e679 (diff) | |
parent | 1bcf59856fae624e72153c631b94a1c7cca17d9e (diff) | |
download | cmd2-git-44282fa49b2db9e4de7dc2f08e4d60e8b2be145f.tar.gz |
Merge branch 'master' into type_hinting
Diffstat (limited to 'tasks.py')
-rw-r--r-- | tasks.py | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -49,11 +49,26 @@ namespace.add_task(pytest) def pytest_clean(context): "Remove pytest cache and code coverage files and directories" #pylint: disable=unused-argument - dirs = ['.pytest-cache', '.cache', 'htmlcov', '.coverage'] + dirs = ['.pytest_cache', '.cache', 'htmlcov', '.coverage'] rmrf(dirs) 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") |