-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (27 loc) · 868 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
.PHONY: test
test:
pytest ./test $(PYTEST_OPTIONS)
.PHONY: snapshot-update
snapshot-update: PYTEST_OPTIONS := --snapshot-update
snapshot-update: test
.PHONY: autoflake
autoflake:
autoflake -r $(AUTOFLAKE_OPTIONS) --exclude */snapshots --remove-unused-variables --remove-all-unused-imports **/ | tee autoflake.log
echo "$(AUTOFLAKE_OPTIONS)" | grep -q -- '--in-place' || ! [ -s autoflake.log ]
.PHONY: isort
isort:
isort -rc **/ --multi-line 3 --trailing-comma --line-width 88 --skip */snapshots $(ISORT_OPTIONS)
.PHONY: black
black:
black **/ --exclude */snapshots $(BLACK_OPTIONS)
.PHONY: mypy
mypy:
mypy **/*.py --ignore-missing-imports
.PHONY: lint
lint: ISORT_OPTIONS := --check-only
lint: BLACK_OPTIONS := --check
lint: autoflake isort black mypy
flake8 ./treeasy
.PHONY: format
format: AUTOFLAKE_OPTIONS := --in-place
format: autoflake isort black