From 5c8bb1cf7ae7ea9d7ccccb6757e4130644e2d545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onard=20Binet?= Date: Sat, 3 Jul 2021 21:18:53 +0200 Subject: [PATCH] mypy added --- .github/workflows/python-package.yml | 8 ++++++++ Makefile | 5 +++++ setup.py | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index e8e2e4d..3d49f96 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -33,6 +33,14 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Format - black + run: | + pip install black + black --check lighttree tests setup.py + - name: Mypy check + run: | + pip install mypy + mypy lighttree - name: Test with pytest run: | pytest diff --git a/Makefile b/Makefile index 102d80d..0c06460 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,11 @@ lint: black: black lighttree tests setup.py +mypy: + mypy lighttree + +check: mypy black lint + develop: -python -m pip install -e ".[develop]" diff --git a/setup.py b/setup.py index 3cebcf5..c9c3f19 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,8 @@ "flake8", "mock", "coverage", - "pytest" + "pytest", + "mypy", ] setup(