Skip to content

Commit 7707361

Browse files
committed
Cast asyncio run in loop to be InHost
1 parent 30db0d8 commit 7707361

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/trio/_core/_tests/test_guest_mode.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
TYPE_CHECKING,
1919
NoReturn,
2020
TypeVar,
21+
cast,
2122
)
2223

2324
import pytest
@@ -465,7 +466,7 @@ def trio_done_callback(main_outcome: Outcome[object]) -> None:
465466
trio_done_fut.set_result(main_outcome)
466467

467468
if pass_not_threadsafe:
468-
run_sync_soon_not_threadsafe = loop.call_soon
469+
run_sync_soon_not_threadsafe = cast(InHost, loop.call_soon)
469470

470471
trio.lowlevel.start_guest_run(
471472
trio_fn,

0 commit comments

Comments
 (0)