-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (28 loc) · 871 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.PHONY: all clean lint type test test-cov
CMD := poetry run
PYMODULE := password_validation
EXTRACODE :=
all: poetry-install mypy-install-types type lint format-check
format: black isort
format-check: black-check isort-check
poetry-install:
poetry install
mypy-install-types:
$(CMD) mypy --install-types --non-interactive --follow-imports=skip $(PYMODULE)
lint:
$(CMD) flake8 $(PYMODULE) $(EXTRACODE)
type:
$(CMD) mypy --follow-imports=skip $(PYMODULE) $(EXTRACODE)
isort:
$(CMD) isort $(PYMODULE) $(EXTRACODE)
isort-check:
$(CMD) isort --check --verbose $(PYMODULE) $(EXTRACODE)
clean:
git clean -Xdf # Delete all files in .gitignore
black:
$(CMD) black .
black-check:
$(CMD) black --check .
update-libs: # Updates python dependencies and commits
poetry update
git add poetry.lock && git commit poetry.lock -m "chore: update project dependencies"