Skip to content

Commit ae3f669

Browse files
committed
Fix type hinting for stream_messages return type
1 parent a06a4f6 commit ae3f669

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

piker/brokers/kucoin.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ async def subscribe(ws: wsproto.WSConnection, connect_id, sym):
598598
@trio_async_generator
599599
async def stream_messages(
600600
ws: NoBsWs, sym: str
601-
) -> AsyncGenerator[NoBsWs, dict]:
601+
) -> AsyncGenerator[tuple[str, dict], None]:
602602
timeouts = 0
603603
last_trade_ts = 0
604604

@@ -612,7 +612,6 @@ async def stream_messages(
612612
await ws._connect()
613613

614614
continue
615-
616615
if msg.get('subject'):
617616
msg = KucoinMsg(**msg)
618617
match msg.subject:
@@ -672,6 +671,8 @@ async def stream_messages(
672671
}
673672

674673

674+
675+
675676
@acm
676677
async def open_history_client(
677678
symbol: str,

0 commit comments

Comments
 (0)