File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 11
11
Any ,
12
12
AsyncIterator ,
13
13
Callable ,
14
+ Coroutine ,
14
15
Generator ,
15
16
List ,
16
17
Optional ,
@@ -543,7 +544,16 @@ def __init__(
543
544
self .logger = logger
544
545
545
546
# This is a coroutine function.
546
- self ._create_connection = create_connection
547
+ self ._create_connection = cast (
548
+ functools .partial [
549
+ Coroutine [
550
+ Any ,
551
+ Any ,
552
+ Tuple [asyncio .BaseTransport , WebSocketClientProtocol ],
553
+ ]
554
+ ],
555
+ create_connection ,
556
+ )
547
557
self ._uri = uri
548
558
self ._wsuri = wsuri
549
559
@@ -652,7 +662,6 @@ async def __await_impl_timeout__(self) -> WebSocketClientProtocol:
652
662
async def __await_impl__ (self ) -> WebSocketClientProtocol :
653
663
for redirects in range (self .MAX_REDIRECTS_ALLOWED ):
654
664
transport , protocol = await self ._create_connection ()
655
- protocol = cast (WebSocketClientProtocol , protocol )
656
665
657
666
try :
658
667
await protocol .handshake (
You can’t perform that action at this time.
0 commit comments