Skip to content

Commit 1677ad8

Browse files
committed
Fix example code in README
1 parent 53cb7bc commit 1677ad8

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,14 +624,18 @@ class MyAsyncTestCase(AsyncTestCase):
624624
To run coroutines in a custom event loop, override static `run_override()` method.
625625

626626
```py
627+
import collections.abc
628+
import concurrent.futures
629+
627630
import sublime_aio
631+
628632
from unittesting import AsyncTestCase
629633

630634

631635
class MyAsyncTestCase(AsyncTestCase):
632636

633-
def run_coroutine(coro: abc.meta.Coroutine) -> cuncurrent.futures.Future:
634-
return sublime_aio.run_coroutine(coro)
637+
def run_coroutine(coro: collections.abc.Coroutine) -> cuncurrent.futures.Future:
638+
return sublime_aio.run_coroutine(coro)
635639
```
636640

637641
Note, asyncio event loops must not block Sublime Text's main thread.

0 commit comments

Comments
 (0)