Add development toolchain baseline

This commit is contained in:
Ilgiz Kamelyev 2026-04-23 21:04:38 +05:00
parent 392e888170
commit 1094a015dd
3 changed files with 26 additions and 4 deletions

View File

@ -1,6 +1,6 @@
PYTHON ?= python3
.PHONY: generate-proto test lint format
.PHONY: generate-proto test lint format typecheck
generate-proto:
$(PYTHON) tools/gen_proto.py
@ -9,8 +9,11 @@ test:
$(PYTHON) -m pytest
lint:
ruff check src tests
black --check src tests
$(PYTHON) -m ruff check src tests
$(PYTHON) -m black --check src tests
format:
black src tests
$(PYTHON) -m black src tests
typecheck:
$(PYTHON) -m pyright

9
pyrightconfig.json Normal file
View File

@ -0,0 +1,9 @@
{
"include": ["src", "tests"],
"exclude": [".venv", ".codex", "**/__pycache__", "build", "dist"],
"extraPaths": ["src"],
"venvPath": ".",
"venv": ".venv",
"typeCheckingMode": "standard",
"pythonVersion": "3.11"
}

10
tests/test_imports.py Normal file
View File

@ -0,0 +1,10 @@
def test_imports():
import app.main.app
import app.runtime.config.loader
import app.runtime.config.models
import app.shared.contracts.proto.v1
assert app.main.app.__name__ == "app.main.app"
assert app.runtime.config.loader.__name__ == "app.runtime.config.loader"
assert app.runtime.config.models.__name__ == "app.runtime.config.models"
assert app.shared.contracts.proto.v1.__name__ == "app.shared.contracts.proto.v1"