diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 03e5ecc8..3689eeba 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -32,3 +32,28 @@ jobs: - name: Run ruff format check working-directory: fastapi_startkit run: uv run ruff format --check . + + pyright: + name: Pyright (non-blocking) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v5 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install dependencies + working-directory: fastapi_startkit + run: uv sync --group dev + + # Type checking is advisory while the existing baseline is worked down; + # continue-on-error keeps a failing run from blocking the pipeline. + - name: Run pyright + continue-on-error: true + working-directory: fastapi_startkit + run: uv run pyright diff --git a/fastapi_startkit/pyproject.toml b/fastapi_startkit/pyproject.toml index dd882fcc..230f56bf 100644 --- a/fastapi_startkit/pyproject.toml +++ b/fastapi_startkit/pyproject.toml @@ -105,6 +105,7 @@ dev = [ "faker>=40.13.0", "langchain>=1.0.0", "langchain-core>=1.0.0", + "pyright>=1.1.411", ] @@ -118,6 +119,19 @@ fixable = ["F401"] [tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401"] +[tool.pyright] +include = ["src/fastapi_startkit"] +exclude = [ + "**/tests", + "**/migrations", + "**/*.backup", + "**/*_backup", + "**/__pycache__", + "**/.venv", +] +typeCheckingMode = "basic" +pythonVersion = "3.12" + [tool.pytest.ini_options] asyncio_mode = "auto" norecursedirs = ["masoniteorm.backup", ".venv", "dist", "build", "__pycache__"] diff --git a/fastapi_startkit/uv.lock b/fastapi_startkit/uv.lock index 7057c468..5808c35b 100644 --- a/fastapi_startkit/uv.lock +++ b/fastapi_startkit/uv.lock @@ -527,7 +527,7 @@ wheels = [ [[package]] name = "fastapi-startkit" -version = "0.47.0" +version = "0.48.0" source = { editable = "." } dependencies = [ { name = "cleo" }, @@ -580,6 +580,7 @@ dev = [ { name = "itsdangerous" }, { name = "langchain" }, { name = "langchain-core" }, + { name = "pyright" }, { name = "pytest" }, { name = "pytest-asyncio" }, { name = "pytest-cov" }, @@ -623,6 +624,7 @@ dev = [ { name = "itsdangerous", specifier = ">=2.2.0" }, { name = "langchain", specifier = ">=1.0.0" }, { name = "langchain-core", specifier = ">=1.0.0" }, + { name = "pyright", specifier = ">=1.1.411" }, { name = "pytest", specifier = ">=9.0.3" }, { name = "pytest-asyncio", specifier = ">=1.3.0" }, { name = "pytest-cov", specifier = ">=6.0.0" }, @@ -1209,6 +1211,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/44/0c/37695d6b0168f6714b5c492331636a9e6123d6ec22d25876c68d06eab1b8/nh3-0.3.4-cp38-abi3-win_arm64.whl", hash = "sha256:43ad4eedee7e049b9069bc015b7b095d320ed6d167ecec111f877de1540656e9", size = 616649, upload-time = "2026-03-25T10:57:29.623Z" }, ] +[[package]] +name = "nodeenv" +version = "1.10.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/24/bf/d1bda4f6168e0b2e9e5958945e01910052158313224ada5ce1fb2e1113b8/nodeenv-1.10.0.tar.gz", hash = "sha256:996c191ad80897d076bdfba80a41994c2b47c68e224c542b48feba42ba00f8bb", size = 55611, upload-time = "2025-12-20T14:08:54.006Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/b2/d0896bdcdc8d28a7fc5717c305f1a861c26e18c05047949fb371034d98bd/nodeenv-1.10.0-py2.py3-none-any.whl", hash = "sha256:5bb13e3eed2923615535339b3c620e76779af4cb4c6a90deccc9e36b274d3827", size = 23438, upload-time = "2025-12-20T14:08:52.782Z" }, +] + [[package]] name = "orjson" version = "3.11.9" @@ -1484,6 +1495,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/7c/4c/ad33b92b9864cbde84f259d5df035a6447f91891f5be77788e2a3892bce3/pymysql-1.1.2-py3-none-any.whl", hash = "sha256:e6b1d89711dd51f8f74b1631fe08f039e7d76cf67a42a323d3178f0f25762ed9", size = 45300, upload-time = "2025-08-24T12:55:53.394Z" }, ] +[[package]] +name = "pyright" +version = "1.1.411" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "nodeenv" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/7e/ab/265f7dc69d28113ebba19092e57b075f41543b2ed048429c5f56e2b88eac/pyright-1.1.411.tar.gz", hash = "sha256:d885a0551f2e763b089a02702174e7f4ba77548cddabc972ab86d1f7f1b0f998", size = 4112861, upload-time = "2026-06-25T02:14:06.37Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0a/49/385be530a6a5b78d1cbcd5c2e38debc8959a2fc6bdb716f4e581002979fc/pyright-1.1.411-py3-none-any.whl", hash = "sha256:dc7c72a8e2700c55baa127554040e067041ea53ccfd50bf96308cc4291c7d5d9", size = 6181526, upload-time = "2026-06-25T02:14:04.691Z" }, +] + [[package]] name = "pytest" version = "9.0.3"