File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ def __init__(
2525 client_id : str ,
2626 server_id : str ,
2727 transport_options : TransportOptions ,
28- handshake_metadata : Optional [ HandshakeType ] = None ,
28+ handshake_metadata : HandshakeType ,
2929 ) -> None :
3030 self ._client_id = client_id
3131 self ._server_id = server_id
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ def __init__(
5151 client_id : str ,
5252 server_id : str ,
5353 transport_options : TransportOptions ,
54- handshake_metadata : Optional [ HandshakeType ] = None ,
54+ handshake_metadata : HandshakeType ,
5555 ):
5656 super ().__init__ (
5757 transport_id = client_id ,
@@ -276,7 +276,7 @@ async def _establish_handshake(
276276 transport_id : str ,
277277 to_id : str ,
278278 session_id : str ,
279- handshake_metadata : Optional [ HandshakeType ] ,
279+ handshake_metadata : HandshakeType ,
280280 websocket : WebSocketCommonProtocol ,
281281 old_session : Optional [ClientSession ],
282282 ) -> Tuple [
Original file line number Diff line number Diff line change 11import asyncio
22import logging
33from collections .abc import AsyncIterator
4- from typing import Any , AsyncGenerator , NoReturn
4+ from typing import Any , AsyncGenerator , Literal
55
66import nanoid # type: ignore
77import pytest
@@ -139,11 +139,12 @@ async def client(
139139) -> AsyncGenerator [Client , None ]:
140140 try :
141141 async with serve (server .serve , "localhost" , 8765 ):
142- client : Client [NoReturn ] = Client (
142+ client : Client [Literal [ None ] ] = Client (
143143 "ws://localhost:8765" ,
144144 client_id = "test_client" ,
145145 server_id = "test_server" ,
146146 transport_options = transport_options ,
147+ handshake_metadata = None ,
147148 )
148149 try :
149150 yield client
You can’t perform that action at this time.
0 commit comments