From 037176524bc6aca0c715b100cae84f42a03ed5cd Mon Sep 17 00:00:00 2001 From: Deimos Date: Mon, 5 Oct 2020 22:55:04 -0600 Subject: [PATCH] Add invoke task to check type annotations --- tildes/tasks.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tildes/tasks.py b/tildes/tasks.py index 2b94377..3ffb7a8 100644 --- a/tildes/tasks.py +++ b/tildes/tasks.py @@ -56,6 +56,13 @@ def test(context, quiet=False, webtests=False, html_validation=False): context.run("pytest " + " ".join(pytest_args), pty=True) +@task +def type_checking(context): + """Run static type checking on the Python code.""" + output("Running static type checking... ") + context.run("mypy .") + + @task def update_pip_requirements(context): """Use pip-tools to update package versions in the requirements files."""