Slightly simplify if statement, add additional test

This commit is contained in:
Matthias
2021-07-07 20:05:56 +02:00
parent 8248d1acd1
commit 682f880630
2 changed files with 13 additions and 4 deletions

View File

@@ -101,9 +101,10 @@ class AgeFilter(IPairList):
return True
if daily_candles is not None:
if len(daily_candles) >= self._min_days_listed and \
(True if not self._max_days_listed
else len(daily_candles) <= self._max_days_listed):
if (
len(daily_candles) >= self._min_days_listed
and (not self._max_days_listed or len(daily_candles) <= self._max_days_listed)
):
# We have fetched at least the minimum required number of daily candles
# Add to cache, store the time we last checked this symbol
self._symbolsChecked[pair] = arrow.utcnow().int_timestamp * 1000