change typing to async iterator
This commit is contained in:
parent
48a1f2418f
commit
d2870d48ea
@ -3,7 +3,7 @@ import logging
|
|||||||
import time
|
import time
|
||||||
from collections import deque
|
from collections import deque
|
||||||
from contextlib import asynccontextmanager
|
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 uuid import uuid4
|
||||||
|
|
||||||
from freqtrade.rpc.api_server.ws.proxy import WebSocketProxy
|
from freqtrade.rpc.api_server.ws.proxy import WebSocketProxy
|
||||||
@ -208,7 +208,7 @@ class WebSocketChannel:
|
|||||||
async def create_channel(
|
async def create_channel(
|
||||||
websocket: WebSocketType,
|
websocket: WebSocketType,
|
||||||
**kwargs
|
**kwargs
|
||||||
) -> AsyncGenerator[WebSocketChannel, None]:
|
) -> AsyncIterator[WebSocketChannel]:
|
||||||
"""
|
"""
|
||||||
Context manager for safely opening and closing a WebSocketChannel
|
Context manager for safely opening and closing a WebSocketChannel
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user