]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
refactor(qav3): rename variables to sensible name
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 16 Jun 2025 13:03:32 +0000 (15:03 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 16 Jun 2025 13:03:32 +0000 (15:03 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py
quickadapter/user_data/strategies/Utils.py

index 47f569fa22eb933288121fd81ff0f68fb6b16493..304d2065a3eec7110f09a7c0fc48fbddce0ce582 100644 (file)
@@ -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)
index f598b790e81c1ba51e17b5752e72d82c23da74a1..d4e61fed5a422043d5b64f3f61cce3a221b36752 100644 (file)
@@ -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)