From 573de1cf08a323accee427bd168a8bbd0fec7430 Mon Sep 17 00:00:00 2001 From: hoeckxer Date: Tue, 5 Jan 2021 15:30:29 +0100 Subject: [PATCH] Fixed flake8 warnings --- freqtrade/strategy/interface.py | 5 +++-- tests/strategy/test_interface.py | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 8976b2fd5..2b4a8dd03 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -21,7 +21,6 @@ from freqtrade.persistence import PairLocks, Trade from freqtrade.strategy.strategy_wrapper import strategy_safe_wrapper from freqtrade.wallets import Wallets - logger = logging.getLogger(__name__) @@ -482,7 +481,9 @@ class IStrategy(ABC): logger.debug('trigger: %s (pair=%s) buy=%s sell=%s', latest['date'], pair, str(buy), str(sell)) timeframe_seconds = timeframe_to_seconds(timeframe) - if self.ignore_expired_candle(latest_date=latest_date, timeframe_seconds=timeframe_seconds, buy=buy): + if self.ignore_expired_candle(latest_date=latest_date, + timeframe_seconds=timeframe_seconds, + buy=buy): return False, sell return buy, sell diff --git a/tests/strategy/test_interface.py b/tests/strategy/test_interface.py index af086b0da..d7d113a4e 100644 --- a/tests/strategy/test_interface.py +++ b/tests/strategy/test_interface.py @@ -117,7 +117,9 @@ def test_ignore_expired_candle(default_conf, ohlcv_history): mocked_history = ohlcv_history.copy() latest_date = mocked_history['date'].max() - assert strategy.ignore_expired_candle(latest_date=latest_date, timeframe_seconds=300, buy=True) is True + assert strategy.ignore_expired_candle(latest_date=latest_date, + timeframe_seconds=300, + buy=True) is True def test_assert_df_raise(mocker, caplog, ohlcv_history):