Commit 6f96706
committed
build: migrate from mypy to pyright
Replace mypy with pyright as the project's type checker, using strict mode.
Changes:
1. **`pyproject.toml`** — Replace `mypy==2.3.0` with `pyright` in `[project.optional-dependencies] lint`. Remove `[tool.mypy]` section and add `[tool.pyright]` with `typeCheckingMode = "strict"` and equivalent excludes.
2. **`.pre-commit-config.yaml`** — Replace the `mirrors-mypy` hook with a pyright pre-commit hook (`RobertCraiworthy/mirrors-pyright` or run via `uv run pyright .`).
3. **`.github/CONTRIBUTING.md`** — Update the "Run type checking" command from `uv run mypy .` to `uv run pyright .`.
4. **`.gitignore`** — Remove mypy-specific entries (`.mypy_cache/`) if present; no pyright cache directory is needed (it uses `node_modules/.pyright` internally, already gitignored by most templates).
5. **Verify** — Run `uv run pyright .` locally to confirm clean output or surface any new errors to address.1 parent e62633e commit 6f96706
4 files changed
Lines changed: 11 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | 149 | | |
155 | 150 | | |
156 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
27 | 26 | | |
28 | | - | |
29 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 56 | + | |
| 57 | + | |
62 | 58 | | |
63 | 59 | | |
64 | 60 | | |
| |||
0 commit comments