refactor: improve wording from category to space

This commit is contained in:
Matthias
2025-11-08 16:34:12 +01:00
parent 1e50a2da53
commit c5a339eaf3

View File

@@ -63,22 +63,22 @@ class HyperOptAuto(IHyperOpt):
return default_func
def get_indicator_space(
self, category: Literal["buy", "sell", "enter", "exit", "protection"] | str
self, space: Literal["buy", "sell", "enter", "exit", "protection"] | str
) -> list:
"""
Get indicator space for a given space.
:param category: parameter space to get.
:param space: parameter space to get.
"""
indicator_space = [
attr.get_space(attr_name)
for attr_name, attr in self.strategy.enumerate_parameters(category)
for attr_name, attr in self.strategy.enumerate_parameters(space)
if attr.optimize
]
if len(indicator_space) > 0:
return indicator_space
else:
_format_exception_message(
category, self.config.get("hyperopt_ignore_missing_space", False)
space, self.config.get("hyperopt_ignore_missing_space", False)
)
return []