[mypy] configure for usage, need to fix all errors now

This commit is contained in:
Piotr Domański 2024-05-20 13:32:47 +02:00
parent 06e4638f4c
commit d9fd48a50e
3 changed files with 18 additions and 4 deletions

View file

@ -14,15 +14,15 @@ push:
docker push registry.domandoman.xyz/fooder/api
black:
black fooder
python -m black fooder
.PHONY: mypy
mypy:
mypy fooder
python -m mypy fooder
.PHONY: flake
flake:
flake8 fooder
python -m flake8 fooder
.PHONY: lint
lint: black mypy flake
@ -34,7 +34,7 @@ version:
.PHONY: create-venv
create-venv:
python3 -m venv .venv --prompt="fooderapi-venv" --system-site-packages
bash -c "source .venv/bin/activate && pip install -r requirements_local.txt"
bash -c "source .venv/bin/activate && pip install -r requirements_local.txt && (echo y | mypy --install-types)"
.PHONY: test
test:

12
mypy.ini Normal file
View file

@ -0,0 +1,12 @@
[mypy]
plugins = sqlalchemy.ext.mypy.plugin,pydantic.mypy
exclude = .*/test/.*
pretty = True
platform = linux
warn_unused_configs = True
warn_unused_ignores = True

View file

@ -13,3 +13,5 @@ flake8
flake8-bugbear
httpx
aiosqlite
mypy
types-requests