fix flake8

This commit is contained in:
xmatthias 2018-05-31 22:17:46 +02:00
parent 633620a5e9
commit e28973c50a
2 changed files with 4 additions and 2 deletions

View File

@ -195,7 +195,8 @@ class Analyze(object):
:return True if bot should sell at current rate :return True if bot should sell at current rate
""" """
current_profit = trade.calc_profit_percent(current_rate) current_profit = trade.calc_profit_percent(current_rate)
if self.strategy.stoploss is not None and current_profit < self.strategy.stoploss: # type: ignore if self.strategy.stoploss is not None \
and current_profit < self.strategy.stoploss: # type: ignore
logger.debug('Stop loss hit.') logger.debug('Stop loss hit.')
return True return True

View File

@ -33,7 +33,8 @@ class StrategyResolver(object):
# Verify the strategy is in the configuration, otherwise fallback to the default strategy # Verify the strategy is in the configuration, otherwise fallback to the default strategy
strategy_name = config.get('strategy') or constants.DEFAULT_STRATEGY strategy_name = config.get('strategy') or constants.DEFAULT_STRATEGY
self.strategy: IStrategy = self._load_strategy(strategy_name, extra_dir=config.get('strategy_path')) self.strategy: IStrategy = self._load_strategy(strategy_name,
extra_dir=config.get('strategy_path'))
# Set attributes # Set attributes
# Check if we need to override configuration # Check if we need to override configuration