fix: ruff lint fixes for v3 test files

This commit is contained in:
Celes Renata
2026-06-27 12:32:52 +00:00
parent 5d7aaacc9d
commit 106b07c0f0
9 changed files with 6 additions and 22 deletions
-5
View File
@@ -10,18 +10,13 @@ Validates: Requirements 4.2, 4.3, 4.4, 4.5, 21.4
""" """
from __future__ import annotations from __future__ import annotations
import math
from hypothesis import given, settings from hypothesis import given, settings
from hypothesis import strategies as st from hypothesis import strategies as st
from services.aggregation.worker import ( from services.aggregation.worker import (
EvidenceCluster,
cluster_evidence,
compute_cluster_llr, compute_cluster_llr,
compute_n_eff, compute_n_eff,
) )
from services.aggregation.scoring import EvidenceUnit
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Hypothesis strategies # Hypothesis strategies
-4
View File
@@ -13,13 +13,9 @@ from hypothesis import given, settings
from hypothesis import strategies as st from hypothesis import strategies as st
from services.trading.position_sizer import ( from services.trading.position_sizer import (
KellySizingResult,
compute_kelly_sizing, compute_kelly_sizing,
compute_reward_ratio,
) )
from services.trading.stop_loss_manager import ( from services.trading.stop_loss_manager import (
TrailingStopResult,
V3StopLevels,
compute_trailing_stop, compute_trailing_stop,
compute_v3_stops, compute_v3_stops,
) )
-1
View File
@@ -13,7 +13,6 @@ from hypothesis import given, settings
from hypothesis import strategies as st from hypothesis import strategies as st
from services.aggregation.interpolation import ( from services.aggregation.interpolation import (
compute_macro_llr,
compute_normalized_macro_exposure, compute_normalized_macro_exposure,
) )
from services.aggregation.signal_propagation import ( from services.aggregation.signal_propagation import (
+4 -3
View File
@@ -16,12 +16,12 @@ from hypothesis import strategies as st
from services.aggregation.bayesian import V3Posterior, compute_v3_posterior from services.aggregation.bayesian import V3Posterior, compute_v3_posterior
from services.aggregation.regime import ( from services.aggregation.regime import (
V3RegimeClassification,
MarketRegime, MarketRegime,
V3RegimeClassification,
classify_regime_v3, classify_regime_v3,
) )
from services.aggregation.worker import EvidenceCluster
from services.aggregation.scoring import EvidenceUnit from services.aggregation.scoring import EvidenceUnit
from services.aggregation.worker import EvidenceCluster
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Hypothesis strategies # Hypothesis strategies
@@ -459,7 +459,8 @@ def test_property_10_suppression_by_weak_dimension(
# Feature: math-core-v3-engine # Feature: math-core-v3-engine
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
from datetime import datetime, timezone as _tz from datetime import datetime
from datetime import timezone as _tz
# Strategies for Property 17 # Strategies for Property 17
extraction_failure_rates = st.floats( extraction_failure_rates = st.floats(
+1 -1
View File
@@ -10,7 +10,7 @@ from __future__ import annotations
from hypothesis import given, settings from hypothesis import given, settings
from hypothesis import strategies as st from hypothesis import strategies as st
from services.aggregation.projection import V3ProjectionState, compute_v3_projection from services.aggregation.projection import compute_v3_projection
from services.aggregation.regime import MarketRegime, V3RegimeClassification from services.aggregation.regime import MarketRegime, V3RegimeClassification
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
-1
View File
@@ -19,7 +19,6 @@ from hypothesis import strategies as st
from services.aggregation.scoring import ( from services.aggregation.scoring import (
EvidenceUnit, EvidenceUnit,
ReliabilityComponents,
SourceStats, SourceStats,
_clamp, _clamp,
compute_llr, compute_llr,
+1 -2
View File
@@ -11,7 +11,7 @@ import math
import pytest import pytest
from services.aggregation.projection import V3ProjectionState, compute_v3_projection from services.aggregation.projection import compute_v3_projection
from services.aggregation.regime import MarketRegime, V3RegimeClassification from services.aggregation.regime import MarketRegime, V3RegimeClassification
from services.recommendation.eligibility import ( from services.recommendation.eligibility import (
ReturnDistribution, ReturnDistribution,
@@ -20,7 +20,6 @@ from services.recommendation.eligibility import (
compute_v3_eligibility, compute_v3_eligibility,
) )
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Helper: construct a V3RegimeClassification for tests # Helper: construct a V3RegimeClassification for tests
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
-4
View File
@@ -7,11 +7,8 @@ from __future__ import annotations
import math import math
from datetime import datetime, timezone from datetime import datetime, timezone
import pytest
from services.aggregation.scoring import ( from services.aggregation.scoring import (
EvidenceUnit, EvidenceUnit,
ReliabilityComponents,
SourceStats, SourceStats,
compute_llr, compute_llr,
compute_v3_reliability, compute_v3_reliability,
@@ -20,7 +17,6 @@ from services.aggregation.scoring import (
normalize_macro_signal, normalize_macro_signal,
) )
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Fixtures # Fixtures
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
-1
View File
@@ -21,7 +21,6 @@ from services.trading.stop_loss_manager import (
compute_v3_stops, compute_v3_stops,
) )
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Kelly sizing: negative edge → size = 0 (Req 14.7) # Kelly sizing: negative edge → size = 0 (Req 14.7)
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------