Skip to content

Commit db8d901

Browse files
tjkusonseifertm
authored andcommitted
Add pyright hook
1 parent 66b9f8e commit db8d901

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ repos:
7878
rev: v1.11.0
7979
hooks:
8080
- id: zizmor
81+
- repo: https://github.com/RobertCraigie/pyright-python
82+
rev: v1.1.403
83+
hooks:
84+
- id: pyright
85+
exclude: ^(docs|tests)/.*
86+
additional_dependencies:
87+
- pytest
8188
ci:
8289
skip:
8390
- actionlint-docker

pytest_asyncio/plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ def _from_function(cls, function: Function, /) -> Function:
418418
Function item.
419419
"""
420420
assert function.get_closest_marker("asyncio")
421+
assert function.parent is not None
421422
subclass_instance = cls.from_parent(
422423
function.parent,
423424
name=function.name,

0 commit comments

Comments
 (0)