diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d42f18d0..03854829 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -78,6 +78,14 @@ repos: rev: v1.11.0 hooks: - id: zizmor +- repo: https://github.com/RobertCraigie/pyright-python + rev: v1.1.403 + hooks: + - id: pyright + exclude: ^(docs|tests)/.* + additional_dependencies: + - pytest + - nodeenv ci: skip: - actionlint-docker diff --git a/pytest_asyncio/plugin.py b/pytest_asyncio/plugin.py index 9bfcfc64..5955bb0a 100644 --- a/pytest_asyncio/plugin.py +++ b/pytest_asyncio/plugin.py @@ -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,