@@ -21,6 +21,7 @@ _T = TypeVar('_T')
21
21
_Context = Dict [str , Any ]
22
22
_ExceptionHandler = Callable [[asyncio .AbstractEventLoop , _Context ], Any ]
23
23
_SSLContext = Union [bool , None , ssl .SSLContext ]
24
+ _TransProtPair = Tuple [asyncio .transports .BaseTransport , asyncio .protocols .BaseProtocol ]
24
25
25
26
class Loop :
26
27
def call_soon (
@@ -155,7 +156,7 @@ class Loop:
155
156
server_hostname : Optional [str ] = ...,
156
157
ssl_handshake_timeout : Optional [float ] = ...,
157
158
ssl_shutdown_timeout : Optional [float ] = ...,
158
- ) -> asyncio . events . _TransProtPair : ...
159
+ ) -> _TransProtPair : ...
159
160
@overload
160
161
async def create_connection (
161
162
self ,
@@ -172,7 +173,7 @@ class Loop:
172
173
server_hostname : Optional [str ] = ...,
173
174
ssl_handshake_timeout : Optional [float ] = ...,
174
175
ssl_shutdown_timeout : Optional [float ] = ...,
175
- ) -> asyncio . events . _TransProtPair : ...
176
+ ) -> _TransProtPair : ...
176
177
async def create_unix_server (
177
178
self ,
178
179
protocol_factory : asyncio .events ._ProtocolFactory ,
@@ -195,7 +196,7 @@ class Loop:
195
196
server_hostname : Optional [str ] = ...,
196
197
ssl_handshake_timeout : Optional [float ] = ...,
197
198
ssl_shutdown_timeout : Optional [float ] = ...,
198
- ) -> asyncio . events . _TransProtPair : ...
199
+ ) -> _TransProtPair : ...
199
200
def default_exception_handler (self , context : _Context ) -> None : ...
200
201
def get_exception_handler (self ) -> Optional [_ExceptionHandler ]: ...
201
202
def set_exception_handler (self , handler : Optional [_ExceptionHandler ]) -> None : ...
@@ -217,7 +218,7 @@ class Loop:
217
218
ssl : _SSLContext = ...,
218
219
ssl_handshake_timeout : Optional [float ] = ...,
219
220
ssl_shutdown_timeout : Optional [float ] = ...,
220
- ) -> asyncio . events . _TransProtPair : ...
221
+ ) -> _TransProtPair : ...
221
222
async def run_in_executor (
222
223
self , executor : Any , func : Callable [..., _T ], * args : Any
223
224
) -> _T : ...
@@ -231,7 +232,7 @@ class Loop:
231
232
stdout : Any = ...,
232
233
stderr : Any = ...,
233
234
** kwargs : Any ,
234
- ) -> asyncio . events . _TransProtPair : ...
235
+ ) -> _TransProtPair : ...
235
236
async def subprocess_exec (
236
237
self ,
237
238
protocol_factory : asyncio .events ._ProtocolFactory ,
@@ -240,13 +241,13 @@ class Loop:
240
241
stdout : Any = ...,
241
242
stderr : Any = ...,
242
243
** kwargs : Any ,
243
- ) -> asyncio . events . _TransProtPair : ...
244
+ ) -> _TransProtPair : ...
244
245
async def connect_read_pipe (
245
246
self , protocol_factory : asyncio .events ._ProtocolFactory , pipe : Any
246
- ) -> asyncio . events . _TransProtPair : ...
247
+ ) -> _TransProtPair : ...
247
248
async def connect_write_pipe (
248
249
self , protocol_factory : asyncio .events ._ProtocolFactory , pipe : Any
249
- ) -> asyncio . events . _TransProtPair : ...
250
+ ) -> _TransProtPair : ...
250
251
def add_signal_handler (
251
252
self , sig : int , callback : Callable [..., Any ], * args : Any
252
253
) -> None : ...
@@ -264,7 +265,7 @@ class Loop:
264
265
reuse_port : Optional [bool ] = ...,
265
266
allow_broadcast : Optional [bool ] = ...,
266
267
sock : Optional [socket ] = ...,
267
- ) -> asyncio . events . _TransProtPair : ...
268
+ ) -> _TransProtPair : ...
268
269
async def shutdown_asyncgens (self ) -> None : ...
269
270
async def shutdown_default_executor (self ) -> None : ...
270
271
# Loop doesn't implement these, but since they are marked as abstract in typeshed,
0 commit comments