Skip to content

Commit 47cea89

Browse files
committed
Add pyright hook
1 parent 07cb01f commit 47cea89

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ repos:
4848
exclude: ^(docs|tests)/.*
4949
additional_dependencies:
5050
- pytest
51+
- backports-asyncio-runner
5152
- repo: https://github.com/pre-commit/pygrep-hooks
5253
rev: v1.10.0
5354
hooks:
@@ -78,6 +79,14 @@ repos:
7879
rev: v1.11.0
7980
hooks:
8081
- id: zizmor
82+
- repo: https://github.com/RobertCraigie/pyright-python
83+
rev: v1.1.403
84+
hooks:
85+
- id: pyright
86+
exclude: ^(docs|tests)/.*
87+
additional_dependencies:
88+
- pytest
89+
- backports-asyncio-runner
8190
ci:
8291
skip:
8392
- actionlint-docker

pytest_asyncio/plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ def _from_function(cls, function: Function, /) -> Function:
392392
Function item.
393393
"""
394394
assert function.get_closest_marker("asyncio")
395+
assert function.parent is not None
395396
subclass_instance = cls.from_parent(
396397
function.parent,
397398
name=function.name,

0 commit comments

Comments
 (0)