refactor: remove pointless wrapper

This commit is contained in:
Matthias
2025-11-02 13:01:49 +01:00
parent 4b0b306c44
commit ac51b41fdf
2 changed files with 2 additions and 10 deletions

View File

@@ -140,6 +140,7 @@ def start_list_strategies(args: dict[str, Any]) -> None:
"""
from freqtrade.configuration import setup_utils_configuration
from freqtrade.resolvers import StrategyResolver
from freqtrade.strategy.hyper import detect_all_parameters
config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE)
@@ -153,7 +154,7 @@ def start_list_strategies(args: dict[str, Any]) -> None:
strategy_objs = sorted(strategy_objs, key=lambda x: x["name"])
for obj in strategy_objs:
if obj["class"]:
obj["hyperoptable"] = obj["class"].detect_all_parameters()
obj["hyperoptable"] = detect_all_parameters(obj["class"])
else:
obj["hyperoptable"] = {"count": 0}

View File

@@ -52,15 +52,6 @@ class HyperStrategyMixin:
for par in params:
yield par.name, par
@classmethod
def detect_all_parameters(cls) -> dict:
"""Detect all parameters and return them as a list"""
params = detect_all_parameters(cls)
params.update({"count": len(params["buy"] + params["sell"] + params["protection"])})
return params
def ft_load_params_from_file(self) -> None:
"""
Load Parameters from parameter file