Skip to content

Set up pyright static type checker for the framework#163

Merged
tmgbedu merged 1 commit into
mainfrom
task/pyright-setup-775
Jul 11, 2026
Merged

Set up pyright static type checker for the framework#163
tmgbedu merged 1 commit into
mainfrom
task/pyright-setup-775

Conversation

@tmgbedu

@tmgbedu tmgbedu commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Sets up the pyright static type checker for fastapi_startkit/ — tooling, config, and a baseline. This is a tooling/config-only change; it deliberately does not fix existing type errors.

Changes

  • Add pyright as a dev dependency (fastapi_startkit workspace member).
  • Add [tool.pyright] config to fastapi_startkit/pyproject.toml:
    • include = ["src/fastapi_startkit"]
    • exclude tests, migrations, and backup dirs (**/tests, **/migrations, **/*.backup, **/*_backup, **/__pycache__, **/.venv)
    • typeCheckingMode = "basic", pythonVersion = "3.12"
  • Add a non-blocking pyright job to the Lint workflow using step-level continue-on-error: true, so it reports type issues without ever failing the pipeline.

Baseline

Running uv run pyright from fastapi_startkit/:

651 errors, 113 warnings, 0 informations

These are left in place intentionally to be worked down in follow-up tasks; the CI step is advisory only.

How to run locally

cd fastapi_startkit
uv run pyright

Add pyright as a dev dependency and a [tool.pyright] config scoped to
src/fastapi_startkit with basic type checking, excluding tests,
migrations, and backup directories. Wire an advisory, non-blocking
pyright job into the Lint workflow (continue-on-error) so it surfaces
type issues without blocking the pipeline while the existing baseline
is worked down.

Baseline: 651 errors, 113 warnings.
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tmgbedu tmgbedu merged commit 16d15b7 into main Jul 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant