From 72c87b7cbd958e55319e63cea3844ca69e456dd8 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 2 Nov 2025 13:21:44 +0100 Subject: [PATCH] chore: remove no longer used function --- freqtrade/strategy/hyper.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/freqtrade/strategy/hyper.py b/freqtrade/strategy/hyper.py index 5c54b0f71..23a2f7c43 100644 --- a/freqtrade/strategy/hyper.py +++ b/freqtrade/strategy/hyper.py @@ -181,34 +181,6 @@ class HyperStrategyMixin: return params -def detect_parameters( - obj: HyperStrategyMixin | type[HyperStrategyMixin], category: str -) -> Iterator[tuple[str, BaseParameter]]: - """ - TODO: replace with the below logic completely - Detect all parameters for 'category' for "obj" - :param obj: Strategy object or class - :param category: category - usually `'buy', 'sell', 'protection',... - """ - for attr_name in dir(obj): - if not attr_name.startswith("__"): # Ignore internals, not strictly necessary. - attr = getattr(obj, attr_name) - if issubclass(attr.__class__, BaseParameter): - if ( - attr_name.startswith(category + "_") - and attr.category is not None - and attr.category != category - ): - raise OperationalException( - f"Inconclusive parameter name {attr_name}, category: {attr.category}." - ) - - if category == attr.category or ( - attr_name.startswith(category + "_") and attr.category is None - ): - yield attr_name, attr - - def detect_all_parameters( obj: HyperStrategyMixin | type[HyperStrategyMixin], ) -> AllSpaceParams: