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 return default_func
def get_indicator_space( def get_indicator_space(
self, category: Literal["buy", "sell", "enter", "exit", "protection"] | str self, space: Literal["buy", "sell", "enter", "exit", "protection"] | str
) -> list: ) -> list:
""" """
Get indicator space for a given space. Get indicator space for a given space.
:param category: parameter space to get. :param space: parameter space to get.
""" """
indicator_space = [ indicator_space = [
attr.get_space(attr_name) 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 attr.optimize
] ]
if len(indicator_space) > 0: if len(indicator_space) > 0:
return indicator_space return indicator_space
else: else:
_format_exception_message( _format_exception_message(
category, self.config.get("hyperopt_ignore_missing_space", False) space, self.config.get("hyperopt_ignore_missing_space", False)
) )
return [] return []