fix: ruff lint fixes for v3 test files
This commit is contained in:
@@ -10,18 +10,13 @@ Validates: Requirements 4.2, 4.3, 4.4, 4.5, 21.4
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import math
|
||||
|
||||
from hypothesis import given, settings
|
||||
from hypothesis import strategies as st
|
||||
|
||||
from services.aggregation.worker import (
|
||||
EvidenceCluster,
|
||||
cluster_evidence,
|
||||
compute_cluster_llr,
|
||||
compute_n_eff,
|
||||
)
|
||||
from services.aggregation.scoring import EvidenceUnit
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Hypothesis strategies
|
||||
|
||||
@@ -13,13 +13,9 @@ from hypothesis import given, settings
|
||||
from hypothesis import strategies as st
|
||||
|
||||
from services.trading.position_sizer import (
|
||||
KellySizingResult,
|
||||
compute_kelly_sizing,
|
||||
compute_reward_ratio,
|
||||
)
|
||||
from services.trading.stop_loss_manager import (
|
||||
TrailingStopResult,
|
||||
V3StopLevels,
|
||||
compute_trailing_stop,
|
||||
compute_v3_stops,
|
||||
)
|
||||
|
||||
@@ -13,7 +13,6 @@ from hypothesis import given, settings
|
||||
from hypothesis import strategies as st
|
||||
|
||||
from services.aggregation.interpolation import (
|
||||
compute_macro_llr,
|
||||
compute_normalized_macro_exposure,
|
||||
)
|
||||
from services.aggregation.signal_propagation import (
|
||||
|
||||
@@ -16,12 +16,12 @@ from hypothesis import strategies as st
|
||||
|
||||
from services.aggregation.bayesian import V3Posterior, compute_v3_posterior
|
||||
from services.aggregation.regime import (
|
||||
V3RegimeClassification,
|
||||
MarketRegime,
|
||||
V3RegimeClassification,
|
||||
classify_regime_v3,
|
||||
)
|
||||
from services.aggregation.worker import EvidenceCluster
|
||||
from services.aggregation.scoring import EvidenceUnit
|
||||
from services.aggregation.worker import EvidenceCluster
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Hypothesis strategies
|
||||
@@ -459,7 +459,8 @@ def test_property_10_suppression_by_weak_dimension(
|
||||
# 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
|
||||
extraction_failure_rates = st.floats(
|
||||
|
||||
@@ -10,7 +10,7 @@ from __future__ import annotations
|
||||
from hypothesis import given, settings
|
||||
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
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -19,7 +19,6 @@ from hypothesis import strategies as st
|
||||
|
||||
from services.aggregation.scoring import (
|
||||
EvidenceUnit,
|
||||
ReliabilityComponents,
|
||||
SourceStats,
|
||||
_clamp,
|
||||
compute_llr,
|
||||
|
||||
@@ -11,7 +11,7 @@ import math
|
||||
|
||||
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.recommendation.eligibility import (
|
||||
ReturnDistribution,
|
||||
@@ -20,7 +20,6 @@ from services.recommendation.eligibility import (
|
||||
compute_v3_eligibility,
|
||||
)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Helper: construct a V3RegimeClassification for tests
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -7,11 +7,8 @@ from __future__ import annotations
|
||||
import math
|
||||
from datetime import datetime, timezone
|
||||
|
||||
import pytest
|
||||
|
||||
from services.aggregation.scoring import (
|
||||
EvidenceUnit,
|
||||
ReliabilityComponents,
|
||||
SourceStats,
|
||||
compute_llr,
|
||||
compute_v3_reliability,
|
||||
@@ -20,7 +17,6 @@ from services.aggregation.scoring import (
|
||||
normalize_macro_signal,
|
||||
)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Fixtures
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -21,7 +21,6 @@ from services.trading.stop_loss_manager import (
|
||||
compute_v3_stops,
|
||||
)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Kelly sizing: negative edge → size = 0 (Req 14.7)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user