Some minor cleanup and improved test coverage

This commit is contained in:
Matthias
2021-08-02 07:15:09 +02:00
parent 059c32b067
commit b63eda3a2b
2 changed files with 16 additions and 3 deletions

View File

@@ -51,9 +51,12 @@ class RangeStabilityFilter(IPairList):
"""
Short whitelist method description - used for startup-messages
"""
max_rate_desc = ""
if self._max_rate_of_change:
max_rate_desc = (f" and above {self._max_rate_of_change}")
return (f"{self.name} - Filtering pairs with rate of change below "
f"{self._min_rate_of_change} and above "
f"{self._max_rate_of_change} over the last {plural(self._days, 'day')}.")
f"{self._min_rate_of_change}{max_rate_desc} over the "
f"last {plural(self._days, 'day')}.")
def filter_pairlist(self, pairlist: List[str], tickers: Dict) -> List[str]:
"""