mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Lint: Merge mypy makefile targets into the lint
target
This commit is contained in:
parent
e96b44e10a
commit
da5490a5a1
1 changed files with 2 additions and 10 deletions
12
Makefile
12
Makefile
|
@ -1,7 +1,6 @@
|
||||||
LARGE_TEST_REPO_DIR:=tests/test_docs_large
|
LARGE_TEST_REPO_DIR:=tests/test_docs_large
|
||||||
GIT_DESC=$$(git describe)
|
GIT_DESC=$$(git describe)
|
||||||
JUNIT_FLAGS := --capture=sys -o junit_logging=all
|
JUNIT_FLAGS := --capture=sys -o junit_logging=all
|
||||||
|
|
||||||
MYPY_ARGS := --ignore-missing-imports \
|
MYPY_ARGS := --ignore-missing-imports \
|
||||||
--disallow-incomplete-defs \
|
--disallow-incomplete-defs \
|
||||||
--disallow-untyped-defs \
|
--disallow-untyped-defs \
|
||||||
|
@ -10,19 +9,12 @@ MYPY_ARGS := --ignore-missing-imports \
|
||||||
--warn-unused-ignores \
|
--warn-unused-ignores \
|
||||||
--exclude $(LARGE_TEST_REPO_DIR)/*.py
|
--exclude $(LARGE_TEST_REPO_DIR)/*.py
|
||||||
|
|
||||||
mypy-host:
|
|
||||||
mypy $(MYPY_ARGS) dangerzone
|
|
||||||
|
|
||||||
mypy-tests:
|
|
||||||
mypy $(MYPY_ARGS) tests
|
|
||||||
|
|
||||||
mypy: mypy-host mypy-tests ## check type hints with mypy
|
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint: ## Check the code for linting, formatting, and typing issues with ruff and mypy
|
lint: ## Check the code for linting, formatting, and typing issues with ruff and mypy
|
||||||
ruff check
|
ruff check
|
||||||
ruff format --check
|
ruff format --check
|
||||||
mypy
|
mypy $(MYPY_ARGS) dangerzone
|
||||||
|
mypy $(MYPY_ARGS) tests
|
||||||
|
|
||||||
.PHONY: fix
|
.PHONY: fix
|
||||||
fix: ## apply all the suggestions from ruff
|
fix: ## apply all the suggestions from ruff
|
||||||
|
|
Loading…
Reference in a new issue