chore(toolchain): update pyproject.toml type checking and add test target to Makefile

- Include tests/ in pyright and configure extraPaths for contracts package.
- Unmask generated gRPC stubs so type checks verify contract seams.
- Add test target to Makefile invoking uv run pytest.

Closes #3
This commit is contained in:
kiskaadee committed 2026-10-31 20:49:11 -05:00
1 parent f5e290fd96
commit 083fe61549
2 files changed
+10 -6

No files matched your search

+4 -1
View File
@@ -1,7 +1,10 @@
.PHONY: generate test lint format check .PHONY: generate test lint format check
generate: generate:
uv run buf generate nix develop --command buf generate
test:
uv run pytest
lint: lint:
uv run ruff check . uv run ruff check .
+6 -5
View File
@@ -23,14 +23,15 @@ dev = [
[tool.pyright] [tool.pyright]
venvPath = "." venvPath = "."
venv = ".venv" venv = ".venv"
extraPaths = ["services/bff/src", "services/worker/src"] extraPaths = ["services/bff/src", "services/worker/src", "services/contracts/src"]
include = ["services"] include = ["services/bff", "services/worker", "tests"]
exclude = ["**/__pycache__", "services/**/magnetflix/"] exclude = ["**/__pycache__"]
reportIncompatibleVariableOverride = "none"
[tool.ruff] [tool.ruff]
line-length = 88 line-length = 88
target-version = "py312" target-version = "py312"
extend-exclude = ["services/**/magnetflix/"] extend-exclude = ["services/contracts/src/magnetflix/v1/"]
[tool.ruff.lint] [tool.ruff.lint]
select = ["E", "F", "I"] select = ["E", "F", "I"]
@@ -39,5 +40,5 @@ select = ["E", "F", "I"]
asyncio_mode = "auto" asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function" asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"] testpaths = ["tests"]
pythonpath = ["services/bff/src", "services/worker/src"] pythonpath = ["services/bff/src", "services/worker/src", "services/contracts/src"]