From 3d91223c2b153e07bf22e14c9a3c38f23755a2de Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 17 May 2026 20:17:43 +0200 Subject: [PATCH] refactor: further improve hyper function wording --- freqtrade/strategy/hyper.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/freqtrade/strategy/hyper.py b/freqtrade/strategy/hyper.py index 305379710..1a5f45931 100644 --- a/freqtrade/strategy/hyper.py +++ b/freqtrade/strategy/hyper.py @@ -97,7 +97,7 @@ class HyperStrategyMixin: params_values = deep_merge_dicts( self._ft_params_from_file.get(space, {}), getattr(self, f"{space}_params", {}) ) - self._ft_load_params(self._ft_hyper_params[space], params_values, space, hyperopt) + self._ft_set_param(self._ft_hyper_params[space], params_values, space, hyperopt) def load_params_from_file(self) -> dict: filename_str = getattr(self, "__file__", "") @@ -119,12 +119,15 @@ class HyperStrategyMixin: return {} - def _ft_load_params( + def _ft_set_param( self, params: SpaceParams, param_values: dict, space: str, hyperopt: bool = False ) -> None: """ Set optimizable parameter values. :param params: Dictionary with new parameter values. + :param param_values: Dictionary with values to set. + :param space: The space to which the parameters belong. + :param hyperopt: Flag indicating if we are in hyperopt mode. """ if not param_values: logger.info(f"No params for {space} found, using default values.")