-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (39 loc) · 1.1 KB
/
Copy pathMakefile
File metadata and controls
46 lines (39 loc) · 1.1 KB
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
41
42
43
44
45
46
SHELL=/bin/bash
lint:
@( \
find ./MambuPy -iname "*.py" | xargs pylint --disable=all --enable=trailing-whitespace,trailing-newlines,missing-final-newline --output-format=parseable; \
find ./tests -iname "*.py" | xargs pylint --disable=all --enable=trailing-whitespace,trailing-newlines,missing-final-newline --output-format=parseable; \
)
ifndef APIV2
APIV2 := "apiv2"
endif
test:
@( \
./tests/unit.sh -a $(APIV2); \
)
black:
@( \
echo ""; \
echo "black"; \
black ./MambuPy -l 90 --exclude ".venv|docs|mambupy|MambuPy" --check; \
)
isort:
@( \
echo ""; \
echo "isort"; \
isort ./MambuPy --check-only; \
)
ruff:
@( \
echo ""; \
echo "ruff"; \
ruff check --exclude ".venv,docs,mambupy,MambuPy" --exclude "python" --exclude "flycheck_*" --ignore E501 ./ --quiet; \
)
lint2: ruff black isort
lint2-fix:
@( \
black ./ -l 90 --exclude ".venv|docs|mambupy|MambuPy"; \
isort ./ --force-single-line-imports --quiet --apply -l=250; \
ruff check --exclude ".venv,docs,mambupy,MambuPy" --exclude "python" --exclude "flycheck_*" --ignore E501 ./ --fix; \
isort ./ --quiet --apply; \
)