File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 99
1010
1111__all__ : tuple [str , ...] = ('new_event_loop' ,)
12+ _AbstractEventLoop = __asyncio .AbstractEventLoop
1213
1314
1415_T = _typing .TypeVar ("_T" )
1516
1617
17- class Loop (__BaseLoop , __asyncio . AbstractEventLoop ): # type: ignore[misc]
18+ class Loop (__BaseLoop , _AbstractEventLoop ): # type: ignore[misc]
1819 pass
1920
2021
@@ -100,7 +101,7 @@ async def wrapper():
100101 )
101102
102103
103- def _cancel_all_tasks (loop : __asyncio . AbstractEventLoop ) -> None :
104+ def _cancel_all_tasks (loop : _AbstractEventLoop ) -> None :
104105 # Copied from python/cpython
105106
106107 to_cancel = __asyncio .all_tasks (loop )
@@ -197,9 +198,7 @@ def get_event_loop(self) -> Loop:
197198
198199 def set_event_loop (self , loop : Loop ) -> None :
199200 """Set the event loop."""
200- if loop is not None and not isinstance (
201- loop , __asyncio .AbstractEventLoop
202- ):
201+ if loop is not None and not isinstance (loop , _AbstractEventLoop ):
203202 raise TypeError (
204203 f"loop must be an instance of AbstractEventLoop or None, "
205204 f"not '{ type (loop ).__name__ } '"
You can’t perform that action at this time.
0 commit comments