Skip to content

Commit dc2a79e

Browse files
Add pyright for type checking
- Best type checker to use in an IDE - Use both pyright and mypy - mypy run on pushes and in CI
1 parent 5c2d654 commit dc2a79e

3 files changed

Lines changed: 27 additions & 3 deletions

File tree

.pre-commit-config.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,14 @@ repos:
8484
rev: "v1.18.2"
8585
hooks:
8686
- id: mypy
87-
stages: [pre-commit, pre-merge-commit, pre-push, manual]
87+
stages: [pre-push, manual]
8888
name: mypy
8989
- repo: https://github.com/astral-sh/uv-pre-commit
9090
# uv version.
9191
rev: 0.8.24
9292
hooks:
9393
- id: uv-lock
94+
- repo: https://github.com/RobertCraigie/pyright-python
95+
rev: v1.1.406
96+
hooks:
97+
- id: pyright

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ dev = [
2121
"ruff>=0.6.9",
2222
"pytest>=8.3.3",
2323
"pytest-cov>=5.0.0",
24-
"mypy>=1.11.2",
24+
"mypy>=1.18.2",
2525
"types-PyYAML>=6.0.12.20240808",
2626
"check-jsonschema>=0.28.2",
2727
"pip-audit>=2.7.3",
28+
"pyright>=1.1.406",
2829
]
2930

3031
[tool.isort]
@@ -46,6 +47,10 @@ exclude = [
4647
]
4748
files = "src"
4849

50+
[tool.pyright]
51+
venvPath = "."
52+
venv = ".venv"
53+
4954
[tool.pytest.ini_options]
5055
minversion = "7.4"
5156
testpaths = ["tests"]

uv.lock

Lines changed: 16 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)