From 171da4f9a9b902bde805556edf858c03a377fe0d Mon Sep 17 00:00:00 2001 From: Michael Seifert Date: Wed, 7 Aug 2024 14:40:35 +0200 Subject: [PATCH] refactor: Narrowed down return type of pytest_fixture_setup. --- pytest_asyncio/plugin.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pytest_asyncio/plugin.py b/pytest_asyncio/plugin.py index a653ace5..178fcaa6 100644 --- a/pytest_asyncio/plugin.py +++ b/pytest_asyncio/plugin.py @@ -756,11 +756,10 @@ def pytest_generate_tests(metafunc: Metafunc) -> None: ) -# TODO: #778 Narrow down return type of function when dropping support for pytest 7 @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, -) -> Generator[None, Any, None]: +) -> Generator[None, pluggy.Result, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the