Skip to content

Commit ebec12e

Browse files
Add pyright (#61)
1 parent e9e2a9c commit ebec12e

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

poetry.lock

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

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ mkdocstrings = {version = "^0.27.0", python = ">=3.10", extras = ["python"]}
4040
# The Ruff version is pinned. To update it, also update it in .pre-commit-config.yaml
4141
ruff = { version = "~0.9.3" }
4242
ipykernel = "^6.29.5"
43+
pyright = "^1.1.392"
4344

4445
[tool.poetry.group.test.dependencies]
4546
poethepoet = ">=0.9.0"
@@ -86,9 +87,9 @@ addopts = "-p no:warnings"
8687
cmd = "pytest"
8788
help = "Run tests"
8889

89-
[tool.poe.tasks.types]
90-
cmd = "mypy src --ignore-missing-imports"
91-
help = "Check types with mypy"
90+
[tool.poe.tasks.typecheck]
91+
cmd = "pyright src"
92+
help = "Typecheck the code with Pyright"
9293

9394
[tool.poe.tasks.format]
9495
sequence = ["_format", "_sort-imports"]

src/betterproto2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ def _validate_field_groups(cls, values):
13081308

13091309

13101310
try:
1311-
import betterproto2_rust_codec
1311+
import betterproto2_rust_codec # pyright: ignore[reportMissingImports]
13121312
except ModuleNotFoundError:
13131313
pass
13141314
else:

0 commit comments

Comments
 (0)