Use proper typehint

This commit is contained in:
Matthias
2022-11-28 19:46:50 +01:00
parent aef0324aa7
commit 8a00bf3188
2 changed files with 6 additions and 6 deletions

View File

@@ -2292,7 +2292,7 @@ class Exchange:
def _build_ohlcv_dl_jobs(
self, pair_list: ListPairsWithTimeframes, since_ms: Optional[int], cache: bool
) -> Tuple[List[Coroutine], List[Tuple[str, str, CandleType]]]:
) -> Tuple[List[Coroutine], List[PairWithTimeframe]]:
"""
Build Coroutines to execute as part of refresh_latest_ohlcv
"""

View File

@@ -8,7 +8,7 @@ from typing import Dict, List, Set, Tuple
import ccxt
from freqtrade.constants import Config
from freqtrade.constants import Config, PairWithTimeframe
from freqtrade.enums.candletype import CandleType
from freqtrade.exchange.exchange import timeframe_to_seconds
@@ -23,10 +23,10 @@ class ExchangeWS():
self._thread = Thread(name="ccxt_ws", target=self.__start_forever)
self._background_tasks: Set[asyncio.Task] = set()
self._klines_watching: Set[Tuple[str, str, CandleType]] = set()
self._klines_scheduled: Set[Tuple[str, str, CandleType]] = set()
self.klines_last_refresh: Dict[Tuple[str, str, CandleType], float] = {}
self.klines_last_request: Dict[Tuple[str, str, CandleType], float] = {}
self._klines_watching: Set[PairWithTimeframe] = set()
self._klines_scheduled: Set[PairWithTimeframe] = set()
self.klines_last_refresh: Dict[PairWithTimeframe, float] = {}
self.klines_last_request: Dict[PairWithTimeframe, float] = {}
self._thread.start()
def __start_forever(self) -> None: