Lint: Merge mypy makefile targets into the lint target

This commit is contained in:
jkarasti 2024-12-05 21:45:49 +02:00 committed by Alexis Métaireau
parent e96b44e10a
commit da5490a5a1
No known key found for this signature in database
GPG key ID: C65C7A89A8FFC56E

View file

@ -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