summaryrefslogtreecommitdiff
path: root/tasks.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-06-10 16:26:04 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2018-06-10 16:26:04 -0400
commit608e290c43510dff1cc7256816f1dd242f77a607 (patch)
tree5bbe4bae072111bf7209701a36d5d39f050fc9ef /tasks.py
parent6c2b3193b1d99aaa183fdde8f9bcf5288522d854 (diff)
downloadcmd2-git-608e290c43510dff1cc7256816f1dd242f77a607.tar.gz
Added invoke commands for running mypy and cleaning up after it
Diffstat (limited to 'tasks.py')
-rw-r--r--tasks.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tasks.py b/tasks.py
index 1aec1548..ac525517 100644
--- a/tasks.py
+++ b/tasks.py
@@ -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")