mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
make mypy more pedantic
Borrow the mypy configuration from the securedrop-client Makefile
This commit is contained in:
parent
75c4ee3d2b
commit
1f8e23f164
1 changed files with 10 additions and 5 deletions
15
Makefile
15
Makefile
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue