Fix flake8
This commit is contained in:
parent
dfd61bbf1d
commit
be75522507
@ -152,6 +152,7 @@ def format_results(results: DataFrame):
|
|||||||
results.duration.mean() * 5,
|
results.duration.mean() * 5,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def start(args):
|
def start(args):
|
||||||
global TOTAL_TRIES, PROCESSED, TRIALS, _CURRENT_TRIES
|
global TOTAL_TRIES, PROCESSED, TRIALS, _CURRENT_TRIES
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@ class DefaultStrategy(IStrategy):
|
|||||||
# Optimal stoploss designed for the strategy
|
# Optimal stoploss designed for the strategy
|
||||||
stoploss = -0.10
|
stoploss = -0.10
|
||||||
|
|
||||||
|
|
||||||
def populate_indicators(self, dataframe: DataFrame) -> DataFrame:
|
def populate_indicators(self, dataframe: DataFrame) -> DataFrame:
|
||||||
"""
|
"""
|
||||||
Adds several different TA indicators to the given DataFrame
|
Adds several different TA indicators to the given DataFrame
|
||||||
|
@ -14,6 +14,7 @@ def result():
|
|||||||
def test_default_strategy_class_name():
|
def test_default_strategy_class_name():
|
||||||
assert class_name == DefaultStrategy.__name__
|
assert class_name == DefaultStrategy.__name__
|
||||||
|
|
||||||
|
|
||||||
def test_default_strategy_structure():
|
def test_default_strategy_structure():
|
||||||
assert hasattr(DefaultStrategy, 'minimal_roi')
|
assert hasattr(DefaultStrategy, 'minimal_roi')
|
||||||
assert hasattr(DefaultStrategy, 'stoploss')
|
assert hasattr(DefaultStrategy, 'stoploss')
|
||||||
@ -23,6 +24,7 @@ def test_default_strategy_structure():
|
|||||||
assert hasattr(DefaultStrategy, 'hyperopt_space')
|
assert hasattr(DefaultStrategy, 'hyperopt_space')
|
||||||
assert hasattr(DefaultStrategy, 'buy_strategy_generator')
|
assert hasattr(DefaultStrategy, 'buy_strategy_generator')
|
||||||
|
|
||||||
|
|
||||||
def test_default_strategy(result):
|
def test_default_strategy(result):
|
||||||
strategy = DefaultStrategy()
|
strategy = DefaultStrategy()
|
||||||
|
|
||||||
|
@ -120,6 +120,7 @@ def test_strategy_fallback_default_strategy():
|
|||||||
strategy._load_strategy('../../super_duper')
|
strategy._load_strategy('../../super_duper')
|
||||||
assert not hasattr(Strategy, 'custom_strategy')
|
assert not hasattr(Strategy, 'custom_strategy')
|
||||||
|
|
||||||
|
|
||||||
def test_strategy_singleton():
|
def test_strategy_singleton():
|
||||||
strategy1 = Strategy()
|
strategy1 = Strategy()
|
||||||
strategy1.init({'strategy': 'default_strategy'})
|
strategy1.init({'strategy': 'default_strategy'})
|
||||||
|
Loading…
Reference in New Issue
Block a user