@@ -14,38 +14,39 @@ help:
14
14
@echo " Targets:"
15
15
@echo " up Updates dev/test dependencies"
16
16
@echo " deps Ensure dev/test dependencies are installed"
17
- @echo " check Checks that build is sane"
18
- @echo " test Runs all tests"
19
- @echo " docs Builds the documentation"
17
+ @echo " check Checks that build is sane"
18
+ @echo " test Runs all tests"
19
+ @echo " docs Builds the documentation"
20
20
@echo " style Auto-formats the code"
21
+ @echo " lint Auto-formats the code and check type hints"
21
22
22
23
up :
23
24
@poetry update
24
25
25
26
deps :
26
- @poetry install -E asyncpg -E aiomysql -E accel -E psycopg -E asyncodbc
27
+ @poetry install --all-groups -E asyncpg -E accel -E psycopg -E asyncodbc -E aiomysql
27
28
28
29
deps_with_asyncmy :
29
- @poetry install -E asyncpg -E asyncmy -E accel -E psycopg -E asyncodbc
30
+ @poetry install --all-groups -E asyncpg -E accel -E psycopg -E asyncodbc -E asyncmy
30
31
31
- check : deps build _check
32
+ check : build _check
32
33
_check :
33
- ifneq ($(shell which black) ,)
34
- black --check $(checkfiles) || (echo "Please run 'make style' to auto-fix style issues" && false)
35
- endif
34
+ ruff format --check $(checkfiles ) || (echo " Please run 'make style' to auto-fix style issues" && false)
36
35
ruff check $(checkfiles )
37
36
mypy $(checkfiles )
38
37
# pylint -d C,W,R $(checkfiles)
39
38
# bandit -r $(checkfiles)make
40
39
twine check dist/*
41
40
42
- lint : deps build
43
- ifneq ($(shell which black) ,)
44
- black $(checkfiles)
45
- endif
41
+ style : deps _style
42
+ _style :
43
+ ruff format $(checkfiles )
46
44
ruff check --fix $(checkfiles )
45
+
46
+ lint : build _lint
47
+ _lint :
48
+ $(MAKE ) _style
47
49
mypy $(checkfiles )
48
- # pylint $(checkfiles)
49
50
bandit -c pyproject.toml -r $(checkfiles )
50
51
twine check dist/*
51
52
@@ -94,11 +95,6 @@ docs: deps
94
95
rm -fR ./build
95
96
sphinx-build -M html docs build
96
97
97
- style : deps _style
98
- _style :
99
- isort -src $(checkfiles )
100
- black $(checkfiles )
101
-
102
98
build : deps
103
99
rm -fR dist/
104
100
poetry build
0 commit comments