From: Jérôme Benoit Date: Mon, 16 Jun 2025 13:03:32 +0000 (+0200) Subject: refactor(qav3): rename variables to sensible name X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d4199ef4c34d30161d77e91e79f2db40b41cbcab;p=freqai-strategies.git refactor(qav3): rename variables to sensible name Signed-off-by: Jérôme Benoit --- diff --git a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py index 47f569f..304d206 100644 --- a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py +++ b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py @@ -1338,9 +1338,11 @@ def zigzag( @lru_cache(maxsize=4096) def calculate_slopes_ok_min_max(slopes_ok_threshold: float) -> tuple[int, int]: - raw_bound1 = math.ceil(1 / slopes_ok_threshold) - raw_bound2 = math.ceil(1 / (1 - slopes_ok_threshold)) - return min(raw_bound1, raw_bound2), max(raw_bound1, raw_bound2) + min_slope_bound1 = math.ceil(1 / slopes_ok_threshold) + min_slope_bound2 = math.ceil(1 / (1 - slopes_ok_threshold)) + return min(min_slope_bound1, min_slope_bound2), max( + min_slope_bound1, min_slope_bound2 + ) def calculate_min_slopes_ok(pos: int, slopes_ok_threshold: float) -> int: min_slopes_ok, max_slopes_ok = calculate_slopes_ok_min_max(slopes_ok_threshold) diff --git a/quickadapter/user_data/strategies/Utils.py b/quickadapter/user_data/strategies/Utils.py index f598b79..d4e61fe 100644 --- a/quickadapter/user_data/strategies/Utils.py +++ b/quickadapter/user_data/strategies/Utils.py @@ -467,9 +467,11 @@ def zigzag( @lru_cache(maxsize=4096) def calculate_slopes_ok_min_max(slopes_ok_threshold: float) -> tuple[int, int]: - raw_bound1 = math.ceil(1 / slopes_ok_threshold) - raw_bound2 = math.ceil(1 / (1 - slopes_ok_threshold)) - return min(raw_bound1, raw_bound2), max(raw_bound1, raw_bound2) + min_slope_bound1 = math.ceil(1 / slopes_ok_threshold) + min_slope_bound2 = math.ceil(1 / (1 - slopes_ok_threshold)) + return min(min_slope_bound1, min_slope_bound2), max( + min_slope_bound1, min_slope_bound2 + ) def calculate_min_slopes_ok(pos: int, slopes_ok_threshold: float) -> int: min_slopes_ok, max_slopes_ok = calculate_slopes_ok_min_max(slopes_ok_threshold)