Skip to content

Add pyright type-checking #1172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/731.downstream.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added pyright type-checking.
1 change: 1 addition & 0 deletions pytest_asyncio/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ def _from_function(cls, function: Function, /) -> Function:
Function item.
"""
assert function.get_closest_marker("asyncio")
assert function.parent is not None
subclass_instance = cls.from_parent(
function.parent,
name=function.name,
Expand Down
11 changes: 9 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
minversion = 4.9.0
envlist = py39, py310, py311, py312, py313, py314, pytest-min, docs
envlist = py39, py310, py311, py312, py313, py314, pytest-min, docs, pyright
isolated_build = true
passenv =
CI
Expand Down Expand Up @@ -69,12 +69,19 @@ passenv =
SSH_AUTH_SOCK
skip_install = false

[testenv:pyright]
deps =
pyright[nodejs]
pytest
commands = pyright pytest_asyncio/
skip_install = true

[gh-actions]
python =
3.9: py39, pytest-min
3.10: py310
3.11: py311
3.12: py312
3.13: py313
3.13: py313, pyright
3.14-dev: py314
pypy3: pypy3
Loading