Skip to content

Commit b4f4d1b

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

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
@@ -360,7 +360,9 @@ def pytest_fixture_post_finalizer(fixturedef: FixtureDef, request: SubRequest) -
360360
# Cleanup code based on the implementation of asyncio.run()
361361
try:
362362
if not loop.is_closed():
363-
asyncio.runners._cancel_all_tasks(loop)
363+
asyncio.runners._cancel_all_tasks( # type: ignore[attr-defined]
364+
loop
365+
)
364366
loop.run_until_complete(loop.shutdown_asyncgens())
365367
if sys.version_info >= (3, 9):
366368
loop.run_until_complete(loop.shutdown_default_executor())

0 commit comments

Comments
 (0)