diff --git a/freqtrade/optimize/analysis/lookahead_helpers.py b/freqtrade/optimize/analysis/lookahead_helpers.py index c0e6fa1ba..b502716dc 100644 --- a/freqtrade/optimize/analysis/lookahead_helpers.py +++ b/freqtrade/optimize/analysis/lookahead_helpers.py @@ -64,7 +64,7 @@ class LookaheadAnalysisSubFunctions: table = tabulate(data, headers=headers, tablefmt="orgtbl") print(table) - return table, headers, data + return data @staticmethod def export_to_csv(config: Dict[str, Any], lookahead_analysis: List[LookaheadAnalysis]): diff --git a/freqtrade/optimize/analysis/recursive_helpers.py b/freqtrade/optimize/analysis/recursive_helpers.py index cde1a214e..90ac8ed1d 100644 --- a/freqtrade/optimize/analysis/recursive_helpers.py +++ b/freqtrade/optimize/analysis/recursive_helpers.py @@ -34,9 +34,9 @@ class RecursiveAnalysisSubFunctions: table = tabulate(data, headers=headers, tablefmt="orgtbl") print(table) - return table, headers, data + return data - return None, None, data + return data @staticmethod def calculate_config_overrides(config: Config): diff --git a/tests/optimize/test_lookahead_analysis.py b/tests/optimize/test_lookahead_analysis.py index 88e3ad877..f7d38b24b 100644 --- a/tests/optimize/test_lookahead_analysis.py +++ b/tests/optimize/test_lookahead_analysis.py @@ -147,7 +147,7 @@ def test_lookahead_helper_text_table_lookahead_analysis_instances(lookahead_conf instance = LookaheadAnalysis(lookahead_conf, strategy_obj) instance.current_analysis = analysis - _table, _headers, data = LookaheadAnalysisSubFunctions.text_table_lookahead_analysis_instances( + data = LookaheadAnalysisSubFunctions.text_table_lookahead_analysis_instances( lookahead_conf, [instance] ) @@ -163,14 +163,14 @@ def test_lookahead_helper_text_table_lookahead_analysis_instances(lookahead_conf analysis.false_exit_signals = 10 instance = LookaheadAnalysis(lookahead_conf, strategy_obj) instance.current_analysis = analysis - _table, _headers, data = LookaheadAnalysisSubFunctions.text_table_lookahead_analysis_instances( + data = LookaheadAnalysisSubFunctions.text_table_lookahead_analysis_instances( lookahead_conf, [instance] ) assert data[0][2].__contains__("error") # edit it into not showing an error instance.failed_bias_check = False - _table, _headers, data = LookaheadAnalysisSubFunctions.text_table_lookahead_analysis_instances( + data = LookaheadAnalysisSubFunctions.text_table_lookahead_analysis_instances( lookahead_conf, [instance] ) assert data[0][0] == "strategy_test_v3_with_lookahead_bias.py" @@ -183,7 +183,7 @@ def test_lookahead_helper_text_table_lookahead_analysis_instances(lookahead_conf analysis.false_indicators.append("falseIndicator1") analysis.false_indicators.append("falseIndicator2") - _table, _headers, data = LookaheadAnalysisSubFunctions.text_table_lookahead_analysis_instances( + data = LookaheadAnalysisSubFunctions.text_table_lookahead_analysis_instances( lookahead_conf, [instance] ) @@ -193,7 +193,7 @@ def test_lookahead_helper_text_table_lookahead_analysis_instances(lookahead_conf assert len(data) == 1 # check amount of multiple rows - _table, _headers, data = LookaheadAnalysisSubFunctions.text_table_lookahead_analysis_instances( + data = LookaheadAnalysisSubFunctions.text_table_lookahead_analysis_instances( lookahead_conf, [instance, instance, instance] ) assert len(data) == 3 diff --git a/tests/optimize/test_recursive_analysis.py b/tests/optimize/test_recursive_analysis.py index 2969b4153..e16c82d24 100644 --- a/tests/optimize/test_recursive_analysis.py +++ b/tests/optimize/test_recursive_analysis.py @@ -105,9 +105,7 @@ def test_recursive_helper_text_table_recursive_analysis_instances(recursive_conf instance = RecursiveAnalysis(recursive_conf, strategy_obj) instance.dict_recursive = dict_diff - _table, _headers, data = RecursiveAnalysisSubFunctions.text_table_recursive_analysis_instances( - [instance] - ) + data = RecursiveAnalysisSubFunctions.text_table_recursive_analysis_instances([instance]) # check row contents for a try that has too few signals assert data[0][0] == "rsi" @@ -118,9 +116,7 @@ def test_recursive_helper_text_table_recursive_analysis_instances(recursive_conf dict_diff = dict() instance = RecursiveAnalysis(recursive_conf, strategy_obj) instance.dict_recursive = dict_diff - _table, _headers, data = RecursiveAnalysisSubFunctions.text_table_recursive_analysis_instances( - [instance] - ) + data = RecursiveAnalysisSubFunctions.text_table_recursive_analysis_instances([instance]) assert len(data) == 0