From 043e15fe140cfff8725d4f615f42fa1c55779402 Mon Sep 17 00:00:00 2001 From: Giel van Schijndel Date: Fri, 23 Apr 2021 12:50:07 +0200 Subject: ci: check types with mypy This will result in _partial_ type checking of the type annotations by using mypy. Keep in mind though that mypy is performing _static_ analysis in a _dynamic_ language so it can only partially check for correctness. Some other tool(s) will be needed to have more complete type checking at runtime. E.g. [typeguard]. [typeguard]: https://pypi.org/project/typeguard/ --- .github/workflows/pythonpackage.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index eb5c894e..3c7215cb 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -47,6 +47,11 @@ jobs: pip install flake8 # stop the build if there are Python syntax errors or undefined names flake8 --ignore=W293,E265,E266,W503,W504,E731 --count --show-source --statistics + - name: Check types with mypy + run: | + set -x + pip install tox + tox -e type - name: Test with nose run: | set -x -- cgit v1.2.1