Explicitly check if dp is available

This commit is contained in:
Matthias
2020-06-15 14:08:57 +02:00
parent 55fa514ec9
commit 8166b37253
2 changed files with 9 additions and 5 deletions

View File

@@ -26,7 +26,7 @@ class DataProvider:
self._config = config
self._exchange = exchange
self._pairlists = pairlists
self.__cached_pairs: Dict[PairWithTimeframe, Tuple(DataFrame, datetime)] = {}
self.__cached_pairs: Dict[PairWithTimeframe, Tuple[DataFrame, datetime]] = {}
def _set_cached_df(self, pair: str, timeframe: str, dataframe: DataFrame) -> None:
"""
@@ -102,8 +102,7 @@ class DataProvider:
logger.warning(f"No data found for ({pair}, {timeframe}).")
return data
def get_analyzed_dataframe(self, pair: str,
timeframe: str = None) -> Tuple[DataFrame, datetime]:
def get_analyzed_dataframe(self, pair: str, timeframe: str) -> Tuple[DataFrame, datetime]:
"""
:param pair: pair to get the data for
:param timeframe: timeframe to get data for