flake 8 fixes
This commit is contained in:
parent
53fb8b05e7
commit
00939b63f2
@ -483,7 +483,7 @@ class FreqtradeBot(LoggingMixin):
|
||||
if self.config.get('use_custom_entry_price', False):
|
||||
buy_rate = self.exchange.get_rate(pair, refresh=True, side="buy")
|
||||
custom_entry_price = strategy_safe_wrapper(self.strategy.custom_entry_price,
|
||||
default_retval=stake_amount)(
|
||||
default_retval=stake_amount)(
|
||||
pair=pair, current_time=datetime.now(timezone.utc),
|
||||
current_rate=buy_rate)
|
||||
|
||||
|
@ -664,10 +664,10 @@ class IStrategy(ABC, HyperStrategyMixin):
|
||||
"""
|
||||
|
||||
if self.use_custom_entry_price:
|
||||
entry_price_value = strategy_safe_wrapper(self.custom_entry_price, default_retval=None
|
||||
)(pair=pair,
|
||||
current_time=current_time,
|
||||
current_rate=current_rate)
|
||||
entry_price_value = strategy_safe_wrapper(self.custom_entry_price, default_retval=None)(
|
||||
pair=pair,
|
||||
current_time=current_time,
|
||||
current_rate=current_rate)
|
||||
|
||||
if entry_price_value is not None:
|
||||
if entry_price_value > low:
|
||||
|
@ -904,7 +904,8 @@ def test_execute_buy(mocker, default_conf, fee, limit_buy_order, limit_buy_order
|
||||
with pytest.raises(PricingError, match="Could not determine buy price."):
|
||||
freqtrade.execute_buy(pair, stake_amount)
|
||||
|
||||
def test_execute_buy_custom_entry_price(mocker, default_conf, fee, limit_buy_order, limit_buy_order_open) -> None:
|
||||
|
||||
def test_execute_buy_custom_entry_price(mocker, default_conf, fee, limit_buy_order_open) -> None:
|
||||
patch_RPCManager(mocker)
|
||||
patch_exchange(mocker)
|
||||
default_conf.update({'use_custom_entry_price': True})
|
||||
|
Loading…
Reference in New Issue
Block a user