From d2870d48ea8e7d19782f6a2c753ea622c16d36ae Mon Sep 17 00:00:00 2001 From: Timothy Pogue Date: Sun, 20 Nov 2022 16:24:44 -0700 Subject: [PATCH] change typing to async iterator --- freqtrade/rpc/api_server/ws/channel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/rpc/api_server/ws/channel.py b/freqtrade/rpc/api_server/ws/channel.py index 4bd7b0e4b..8699de66c 100644 --- a/freqtrade/rpc/api_server/ws/channel.py +++ b/freqtrade/rpc/api_server/ws/channel.py @@ -3,7 +3,7 @@ import logging import time from collections import deque from contextlib import asynccontextmanager -from typing import Any, AsyncGenerator, Deque, Dict, List, Optional, Type, Union +from typing import Any, AsyncIterator, Deque, Dict, List, Optional, Type, Union from uuid import uuid4 from freqtrade.rpc.api_server.ws.proxy import WebSocketProxy @@ -208,7 +208,7 @@ class WebSocketChannel: async def create_channel( websocket: WebSocketType, **kwargs -) -> AsyncGenerator[WebSocketChannel, None]: +) -> AsyncIterator[WebSocketChannel]: """ Context manager for safely opening and closing a WebSocketChannel """