change short desc
This commit is contained in:
parent
2d5ced7801
commit
502c69dce3
@ -55,10 +55,13 @@ class AgeFilter(IPairList):
|
|||||||
"""
|
"""
|
||||||
Short whitelist method description - used for startup-messages
|
Short whitelist method description - used for startup-messages
|
||||||
"""
|
"""
|
||||||
return (f"{self.name} - Filtering pairs with age less than "
|
return (
|
||||||
|
f"{self.name} - Filtering pairs with age less than "
|
||||||
f"{self._min_days_listed} {plural(self._min_days_listed, 'day')}"
|
f"{self._min_days_listed} {plural(self._min_days_listed, 'day')}"
|
||||||
|
) + (
|
||||||
" or more than "
|
" or more than "
|
||||||
f"{self._max_days_listed} {plural(self._max_days_listed, 'day')}")
|
f"{self._max_days_listed} {plural(self._max_days_listed, 'day')}"
|
||||||
|
) if self._max_days_listed else ''
|
||||||
|
|
||||||
def filter_pairlist(self, pairlist: List[str], tickers: Dict) -> List[str]:
|
def filter_pairlist(self, pairlist: List[str], tickers: Dict) -> List[str]:
|
||||||
"""
|
"""
|
||||||
@ -105,10 +108,13 @@ class AgeFilter(IPairList):
|
|||||||
self._symbolsChecked[pair] = int(arrow.utcnow().float_timestamp) * 1000
|
self._symbolsChecked[pair] = int(arrow.utcnow().float_timestamp) * 1000
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
self.log_once(f"Removed {pair} from whitelist, because age "
|
self.log_once((
|
||||||
|
f"Removed {pair} from whitelist, because age "
|
||||||
f"{len(daily_candles)} is less than {self._min_days_listed} "
|
f"{len(daily_candles)} is less than {self._min_days_listed} "
|
||||||
f"{plural(self._min_days_listed, 'day')} or more than "
|
f"{plural(self._min_days_listed, 'day')}"
|
||||||
f"{self._max_days_listed} {plural(self._max_days_listed, 'day')}",
|
) + (
|
||||||
logger.info)
|
" or more than "
|
||||||
|
f"{self._max_days_listed} {plural(self._max_days_listed, 'day')}"
|
||||||
|
) if self.max_days_listed else '', logger.info)
|
||||||
return False
|
return False
|
||||||
return False
|
return False
|
||||||
|
@ -487,7 +487,7 @@ def test_VolumePairList_whitelist_gen(mocker, whitelist_conf, shitcoinmarkets, t
|
|||||||
if pairlist['method'] == 'AgeFilter' and pairlist['min_days_listed'] and \
|
if pairlist['method'] == 'AgeFilter' and pairlist['min_days_listed'] and \
|
||||||
len(ohlcv_history) < pairlist['min_days_listed']:
|
len(ohlcv_history) < pairlist['min_days_listed']:
|
||||||
assert log_has_re(r'^Removed .* from whitelist, because age .* is less than '
|
assert log_has_re(r'^Removed .* from whitelist, because age .* is less than '
|
||||||
r'.* day.* or more than .* day', caplog)
|
r'.* day.*', caplog)
|
||||||
if pairlist['method'] == 'AgeFilter' and pairlist['max_days_listed'] and \
|
if pairlist['method'] == 'AgeFilter' and pairlist['max_days_listed'] and \
|
||||||
len(ohlcv_history) > pairlist['max_days_listed']:
|
len(ohlcv_history) > pairlist['max_days_listed']:
|
||||||
assert log_has_re(r'^Removed .* from whitelist, because age .* is less than '
|
assert log_has_re(r'^Removed .* from whitelist, because age .* is less than '
|
||||||
|
Loading…
Reference in New Issue
Block a user