Simplify some pairlist conditions

This commit is contained in:
Matthias
2024-02-14 19:27:15 +01:00
committed by Joe Schr
parent e696c92a0f
commit e63da230d8
2 changed files with 2 additions and 4 deletions

View File

@@ -125,8 +125,7 @@ class VolatilityFilter(IPairList):
:return: True if the pair can stay, false if it should be removed :return: True if the pair can stay, false if it should be removed
""" """
# Check symbol in cache # Check symbol in cache
cached_res = self._pair_cache.get(pair, None) if (cached_res := self._pair_cache.get(pair, None)) is not None:
if cached_res is not None:
return cached_res return cached_res
result = False result = False

View File

@@ -123,8 +123,7 @@ class RangeStabilityFilter(IPairList):
:return: True if the pair can stay, false if it should be removed :return: True if the pair can stay, false if it should be removed
""" """
# Check symbol in cache # Check symbol in cache
cached_res = self._pair_cache.get(pair, None) if (cached_res := self._pair_cache.get(pair, None)) is not None:
if cached_res is not None:
return cached_res return cached_res
result = True result = True