refactor(if-gate): use temp variable instead of if-gate

This commit is contained in:
Joe Schr 2023-02-22 12:26:12 +01:00
parent cdc96136bc
commit 7d906fd4c2
1 changed files with 2 additions and 4 deletions

View File

@ -424,10 +424,8 @@ class DataProvider:
"""
if self._exchange is None:
raise OperationalException(NO_EXCHANGE_EXCEPTION)
if helping_pairs:
self._exchange.refresh_latest_ohlcv(pairlist + helping_pairs)
else:
self._exchange.refresh_latest_ohlcv(pairlist)
final_pairs = (pairlist + helping_pairs) if helping_pairs else pairlist
self._exchange.refresh_latest_ohlcv(final_pairs)
@property
def available_pairs(self) -> ListPairsWithTimeframes: