From 7b9f82c71a960b7314ccffea1d2c6c23e9872da8 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 20 May 2023 11:30:51 +0200 Subject: [PATCH] Remove needless check for "None" list --- freqtrade/commands/optimize_commands.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/freqtrade/commands/optimize_commands.py b/freqtrade/commands/optimize_commands.py index fb2d5ff21..9c753dcb9 100644 --- a/freqtrade/commands/optimize_commands.py +++ b/freqtrade/commands/optimize_commands.py @@ -162,14 +162,13 @@ def start_lookahead_analysis(args: Dict[str, Any]) -> None: strategy_list = [config['strategy']] # check if strategies can be properly loaded, only check them if they can be. - if strategy_list is not None: - for strat in strategy_list: - for strategy_obj in strategy_objs: - if strategy_obj['name'] == strat and strategy_obj not in strategy_list: - lookaheadAnalysis_instances.append( - LookaheadAnalysisSubFunctions.initialize_single_lookahead_analysis( - strategy_obj, config)) - break + for strat in strategy_list: + for strategy_obj in strategy_objs: + if strategy_obj['name'] == strat and strategy_obj not in strategy_list: + lookaheadAnalysis_instances.append( + LookaheadAnalysisSubFunctions.initialize_single_lookahead_analysis( + strategy_obj, config)) + break # report the results if lookaheadAnalysis_instances: