Fix type hinting for stream_messages return type

py311
jaredgoldman 2023-04-21 20:40:23 -04:00
parent a06a4f67cc
commit ae3f6696a7
1 changed files with 3 additions and 2 deletions

View File

@ -598,7 +598,7 @@ async def subscribe(ws: wsproto.WSConnection, connect_id, sym):
@trio_async_generator
async def stream_messages(
ws: NoBsWs, sym: str
) -> AsyncGenerator[NoBsWs, dict]:
) -> AsyncGenerator[tuple[str, dict], None]:
timeouts = 0
last_trade_ts = 0
@ -612,7 +612,6 @@ async def stream_messages(
await ws._connect()
continue
if msg.get('subject'):
msg = KucoinMsg(**msg)
match msg.subject:
@ -672,6 +671,8 @@ async def stream_messages(
}
@acm
async def open_history_client(
symbol: str,