From 7d906fd4c2d0885cd075865a647b8be7dc92561a Mon Sep 17 00:00:00 2001 From: Joe Schr <8218910+TheJoeSchr@users.noreply.github.com> Date: Wed, 22 Feb 2023 12:26:12 +0100 Subject: [PATCH] refactor(if-gate): use temp variable instead of if-gate --- freqtrade/data/dataprovider.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/freqtrade/data/dataprovider.py b/freqtrade/data/dataprovider.py index 78390e3a4..3991432a4 100644 --- a/freqtrade/data/dataprovider.py +++ b/freqtrade/data/dataprovider.py @@ -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: