diff --git a/Makefile b/Makefile index f3f955f..fcfc10e 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000..8e19889 --- /dev/null +++ b/mypy.ini @@ -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 diff --git a/requirements_local.txt b/requirements_local.txt index 1935134..412570b 100644 --- a/requirements_local.txt +++ b/requirements_local.txt @@ -13,3 +13,5 @@ flake8 flake8-bugbear httpx aiosqlite +mypy +types-requests