Skip to content

build: migrate from mypy to pyright#132

Merged
remarkablemark merged 1 commit into
masterfrom
build/pyright
Jul 14, 2026
Merged

build: migrate from mypy to pyright#132
remarkablemark merged 1 commit into
masterfrom
build/pyright

Conversation

@remarkablemark

Copy link
Copy Markdown
Owner

Replace mypy with pyright as the project type checker.

Changes

  • Replace mypy==2.3.0 with pyright==1.1.411 in lint dependencies
  • Add [tool.pyright] with typeCheckingMode = "strict"
  • Remove [tool.mypy] section
  • Update pre-commit hook from mirrors-mypy to a local pyright hook
  • Update CONTRIBUTING.md type-check command
  • Remove mypy cache entries from .gitignore

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.
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e62633e) to head (6f96706).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #132   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines            5         5           
=========================================
  Hits             5         5           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@remarkablemark remarkablemark self-assigned this Jul 14, 2026
@remarkablemark remarkablemark added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file labels Jul 14, 2026
@remarkablemark remarkablemark merged commit f7103fd into master Jul 14, 2026
15 checks passed
@remarkablemark remarkablemark deleted the build/pyright branch July 14, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant