Set up pyright static type checker for the framework#163
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
pyrightas a dev dependency (fastapi_startkitworkspace member).[tool.pyright]config tofastapi_startkit/pyproject.toml:include = ["src/fastapi_startkit"]excludetests, migrations, and backup dirs (**/tests,**/migrations,**/*.backup,**/*_backup,**/__pycache__,**/.venv)typeCheckingMode = "basic",pythonVersion = "3.12"pyrightjob to the Lint workflow using step-levelcontinue-on-error: true, so it reports type issues without ever failing the pipeline.Baseline
Running
uv run pyrightfromfastapi_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