chore: improve type hints (#432)

* chore: improve type hints

* chore: set `warn_unused_ignores` true for mypy

* refactor: use function to compare tortoise version

* refactor: change function name
This commit is contained in:
Waket Zheng
2025-03-04 14:52:12 +08:00
committed by GitHub
parent 8609435815
commit 5d9adbdb54
10 changed files with 686 additions and 112 deletions

View File

@@ -25,6 +25,14 @@ _check:
@bandit -r aerich
check: deps _check
_lint: _build
@ruff format $(checkfiles)
ruff check --fix $(checkfiles)
mypy $(checkfiles)
bandit -c pyproject.toml -r $(checkfiles)
twine check dist/*
lint: deps _lint
test: deps
$(py_warn) TEST_DB=sqlite://:memory: pytest
@@ -43,7 +51,8 @@ test_psycopg:
_testall: test_sqlite test_postgres test_mysql
testall: deps _testall
build: deps
_build:
@poetry build
build: deps _build
ci: build _check _testall