mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-07 14:01:49 +02:00
Compare commits
8 commits
41a6c59634
...
87eac56345
Author | SHA1 | Date | |
---|---|---|---|
![]() |
87eac56345 | ||
![]() |
688bc991ab | ||
![]() |
5ad8092a2c | ||
![]() |
9764a1b3f2 | ||
![]() |
5d4d8ed441 | ||
![]() |
75bbfea6ce | ||
![]() |
0f8382b831 | ||
![]() |
19915fda50 |
2 changed files with 8 additions and 23 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -38,7 +38,7 @@ jobs:
|
||||||
apt-get install -y git make python3 python3-poetry --no-install-recommends
|
apt-get install -y git make python3 python3-poetry --no-install-recommends
|
||||||
poetry install --only lint,test
|
poetry install --only lint,test
|
||||||
- name: Run linters to enforce code style
|
- name: Run linters to enforce code style
|
||||||
run: poetry run make check
|
run: poetry run make lint
|
||||||
- name: Check that the QA script is up to date with the docs
|
- name: Check that the QA script is up to date with the docs
|
||||||
run: "./dev_scripts/qa.py --check-refs"
|
run: "./dev_scripts/qa.py --check-refs"
|
||||||
|
|
||||||
|
|
29
Makefile
29
Makefile
|
@ -1,19 +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
|
||||||
|
|
||||||
lint-ruff: ## check the python source code with various linter rules through ruff
|
|
||||||
ruff check
|
|
||||||
|
|
||||||
lint-ruff-apply: ## apply all fixes made by ruff to the source code
|
|
||||||
ruff check --fix
|
|
||||||
|
|
||||||
format-ruff: ## Check the formatting of the python source code with ruff
|
|
||||||
ruff format --check
|
|
||||||
|
|
||||||
format-ruff-apply: ## apply all the formatting suggestions from ruff
|
|
||||||
ruff format
|
|
||||||
|
|
||||||
MYPY_ARGS := --ignore-missing-imports \
|
MYPY_ARGS := --ignore-missing-imports \
|
||||||
--disallow-incomplete-defs \
|
--disallow-incomplete-defs \
|
||||||
--disallow-untyped-defs \
|
--disallow-untyped-defs \
|
||||||
|
@ -22,19 +9,17 @@ 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:
|
.PHONY: lint
|
||||||
|
lint: ## Check the code for linting, formatting, and typing issues with ruff and mypy
|
||||||
|
ruff check
|
||||||
|
ruff format --check
|
||||||
mypy $(MYPY_ARGS) dangerzone
|
mypy $(MYPY_ARGS) dangerzone
|
||||||
|
|
||||||
mypy-tests:
|
|
||||||
mypy $(MYPY_ARGS) tests
|
mypy $(MYPY_ARGS) tests
|
||||||
|
|
||||||
mypy: mypy-host mypy-tests ## check type hints with mypy
|
|
||||||
|
|
||||||
.PHONY: check
|
|
||||||
check: lint-ruff format-ruff mypy ## check the code with ruff and mypy
|
|
||||||
|
|
||||||
.PHONY: fix
|
.PHONY: fix
|
||||||
fix: lint-ruff-apply format-ruff-apply ## apply all the suggestions from ruff
|
fix: ## apply all the suggestions from ruff
|
||||||
|
ruff check --fix
|
||||||
|
ruff format
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
|
|
Loading…
Reference in a new issue