From 5505845c6fd0210bceceef2729a2dad094ae1754 Mon Sep 17 00:00:00 2001 From: Janne Sinivirta Date: Fri, 26 Jan 2018 18:48:53 +0200 Subject: [PATCH] remove unused method parameter --- freqtrade/main.py | 4 ++-- freqtrade/tests/test_main.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/freqtrade/main.py b/freqtrade/main.py index 3bf945b99..302d4cab0 100755 --- a/freqtrade/main.py +++ b/freqtrade/main.py @@ -55,7 +55,7 @@ def refresh_whitelist(whitelist: List[str]) -> List[str]: return final_list -def process_maybe_execute_buy(conf, interval): +def process_maybe_execute_buy(interval): """ Tries to execute a buy trade in a safe way :return: True if executed @@ -115,7 +115,7 @@ def _process(interval: int, nb_assets: Optional[int] = 0) -> bool: # Query trades from persistence layer trades = Trade.query.filter(Trade.is_open.is_(True)).all() if len(trades) < _CONF['max_open_trades']: - state_changed = process_maybe_execute_buy(_CONF, interval) + state_changed = process_maybe_execute_buy(interval) for trade in trades: state_changed |= process_maybe_execute_sell(trade, interval) diff --git a/freqtrade/tests/test_main.py b/freqtrade/tests/test_main.py index cf0b5283b..225f5e28c 100644 --- a/freqtrade/tests/test_main.py +++ b/freqtrade/tests/test_main.py @@ -50,9 +50,9 @@ def test_main_start_hyperopt(mocker): def test_process_maybe_execute_buy(default_conf, mocker): mocker.patch.dict('freqtrade.main._CONF', default_conf) mocker.patch('freqtrade.main.create_trade', return_value=True) - assert main.process_maybe_execute_buy(default_conf, int(default_conf['ticker_interval'])) + assert main.process_maybe_execute_buy(int(default_conf['ticker_interval'])) mocker.patch('freqtrade.main.create_trade', return_value=False) - assert not main.process_maybe_execute_buy(default_conf, int(default_conf['ticker_interval'])) + assert not main.process_maybe_execute_buy(int(default_conf['ticker_interval'])) def test_process_maybe_execute_sell(default_conf, mocker): @@ -71,7 +71,7 @@ def test_process_maybe_execute_sell(default_conf, mocker): def test_process_maybe_execute_buy_exception(default_conf, mocker, caplog): mocker.patch.dict('freqtrade.main._CONF', default_conf) mocker.patch('freqtrade.main.create_trade', MagicMock(side_effect=DependencyException)) - main.process_maybe_execute_buy(default_conf, int(default_conf['ticker_interval'])) + main.process_maybe_execute_buy(int(default_conf['ticker_interval'])) tt.log_has('Unable to create trade:', caplog.record_tuples)