From 1f8e23f1645a227deb626c91420db89d4075cf6d Mon Sep 17 00:00:00 2001 From: deeplow Date: Thu, 21 Jul 2022 08:46:45 +0100 Subject: [PATCH] make mypy more pedantic Borrow the mypy configuration from the securedrop-client Makefile --- Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 932852f..ddfa41f 100644 --- a/Makefile +++ b/Makefile @@ -14,16 +14,21 @@ lint-isort: ## check imports are organized, with isort lint-isort-apply: ## apply isort's imports organization suggestions isort ./ +MYPY_ARGS := --ignore-missing-imports \ + --disallow-incomplete-defs \ + --disallow-untyped-defs \ + --show-error-codes \ + --warn-unreachable \ + --warn-unused-ignores + mypy-host: - mypy dangerzone + mypy $(MYPY_ARGS) dangerzone mypy-container: - mypy container + mypy $(MYPY_ARGS) container mypy-dev-scripts: - mypy install \ - dev_scripts/* \ - *.py + mypy $(MYPY_ARGS) install dev_scripts/* *.py mypy: mypy-host # mypy-container mypy-dev-scripts ## check type hints with mypy