Skip to content

Commit 5024eb8

Browse files
committed
refactor: Ignore mypy problem when calling asyncio.runners._cancel_all_tasks.
Signed-off-by: Michael Seifert <[email protected]>
1 parent 03ee1b1 commit 5024eb8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pytest_asyncio/plugin.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,9 @@ def pytest_fixture_post_finalizer(fixturedef: FixtureDef, request: SubRequest) -
364364
# Cleanup code based on the implementation of asyncio.run()
365365
try:
366366
if not loop.is_closed():
367-
asyncio.runners._cancel_all_tasks(loop)
367+
asyncio.runners._cancel_all_tasks( # type: ignore[attr-defined]
368+
loop
369+
)
368370
loop.run_until_complete(loop.shutdown_asyncgens())
369371
if sys.version_info >= (3, 9):
370372
loop.run_until_complete(loop.shutdown_default_executor())

0 commit comments

Comments
 (0)