make mypy more pedantic

Borrow the mypy configuration from the securedrop-client Makefile
This commit is contained in:
deeplow 2022-07-21 08:46:45 +01:00
parent 75c4ee3d2b
commit 1f8e23f164
No known key found for this signature in database
GPG key ID: 577982871529A52A

View file

@ -14,16 +14,21 @@ lint-isort: ## check imports are organized, with isort
lint-isort-apply: ## apply isort's imports organization suggestions lint-isort-apply: ## apply isort's imports organization suggestions
isort ./ isort ./
MYPY_ARGS := --ignore-missing-imports \
--disallow-incomplete-defs \
--disallow-untyped-defs \
--show-error-codes \
--warn-unreachable \
--warn-unused-ignores
mypy-host: mypy-host:
mypy dangerzone mypy $(MYPY_ARGS) dangerzone
mypy-container: mypy-container:
mypy container mypy $(MYPY_ARGS) container
mypy-dev-scripts: mypy-dev-scripts:
mypy install \ mypy $(MYPY_ARGS) install dev_scripts/* *.py
dev_scripts/* \
*.py
mypy: mypy-host # mypy-container mypy-dev-scripts ## check type hints with mypy mypy: mypy-host # mypy-container mypy-dev-scripts ## check type hints with mypy