Skip to content

Commit 013d01b

Browse files
tjkusonseifertm
authored andcommitted
Add pyright type-checking to tox configuration
1 parent b12c83b commit 013d01b

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

changelog.d/731.downstream.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added pyright type-checking.

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,

tox.ini

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
minversion = 4.9.0
3-
envlist = py39, py310, py311, py312, py313, py314, pytest-min, docs
3+
envlist = py39, py310, py311, py312, py313, py314, pytest-min, docs, pyright
44
isolated_build = true
55
passenv =
66
CI
@@ -69,6 +69,13 @@ passenv =
6969
SSH_AUTH_SOCK
7070
skip_install = false
7171

72+
[testenv:pyright]
73+
deps =
74+
pyright[nodejs]
75+
pytest
76+
commands = pyright pytest_asyncio/
77+
skip_install = true
78+
7279
[gh-actions]
7380
python =
7481
3.9: py39, pytest-min

0 commit comments

Comments
 (0)