From ae3f6696a7fe618b2d36a455810d0565b9001833 Mon Sep 17 00:00:00 2001 From: jaredgoldman Date: Fri, 21 Apr 2023 20:40:23 -0400 Subject: [PATCH] Fix type hinting for stream_messages return type --- piker/brokers/kucoin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/piker/brokers/kucoin.py b/piker/brokers/kucoin.py index 849901cf..85ee7de6 100755 --- a/piker/brokers/kucoin.py +++ b/piker/brokers/kucoin.py @@ -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,