diff --git a/freqtrade/configuration/configuration.py b/freqtrade/configuration/configuration.py index 5bbbf301d..a64eaa0ca 100644 --- a/freqtrade/configuration/configuration.py +++ b/freqtrade/configuration/configuration.py @@ -300,10 +300,8 @@ class Configuration: self._args_to_config(config, argname='hyperoptexportfilename', logstring='Using hyperopt file: {}') - if self.args.get('lookahead_analysis_exportfilename'): - if self.args["lookahead_analysis_exportfilename"] is not None: - self._args_to_config(config, argname='lookahead_analysis_exportfilename', - logstring='saving lookahead analysis results into {} ...') + self._args_to_config(config, argname='lookahead_analysis_exportfilename', + logstring='Saving lookahead analysis results into {} ...') self._args_to_config(config, argname='epochs', logstring='Parameter --epochs detected ... ' diff --git a/freqtrade/optimize/lookahead_analysis_helpers.py b/freqtrade/optimize/lookahead_analysis_helpers.py index 0f2b78e24..22cbbfa6b 100644 --- a/freqtrade/optimize/lookahead_analysis_helpers.py +++ b/freqtrade/optimize/lookahead_analysis_helpers.py @@ -15,6 +15,7 @@ logger = logging.getLogger(__name__) class LookaheadAnalysisSubFunctions: + @staticmethod def text_table_lookahead_analysis_instances( config: Dict[str, Any], diff --git a/tests/optimize/test_lookahead_analysis.py b/tests/optimize/test_lookahead_analysis.py index 7678726ae..d2e6fbbe1 100644 --- a/tests/optimize/test_lookahead_analysis.py +++ b/tests/optimize/test_lookahead_analysis.py @@ -114,12 +114,11 @@ def test_lookahead_helper_text_table_lookahead_analysis_instances(lookahead_conf analysis.false_entry_signals = 4 analysis.false_exit_signals = 3 - strategy_obj = \ - { - 'name': "strategy_test_v3_with_lookahead_bias", - 'location': PurePosixPath(lookahead_conf['strategy_path'], - f"{lookahead_conf['strategy']}.py") - } + strategy_obj = { + 'name': "strategy_test_v3_with_lookahead_bias", + 'location': PurePosixPath(lookahead_conf['strategy_path'], + f"{lookahead_conf['strategy']}.py") + } instance = LookaheadAnalysis(lookahead_conf, strategy_obj) instance.current_analysis = analysis