fix: lint errors (import sorting, unused vars)

This commit is contained in:
Celes Renata
2026-04-14 19:48:19 +00:00
parent f7a11d14ea
commit d8ea58104c
19 changed files with 60 additions and 31 deletions
-1
View File
@@ -11,7 +11,6 @@ from __future__ import annotations
import json
import logging
import uuid
from dataclasses import dataclass, field
from datetime import datetime, timezone
+1 -3
View File
@@ -16,7 +16,7 @@ from datetime import datetime, timezone
import asyncpg
from services.shared.schemas import TrendDirection, TrendSummary
from services.shared.schemas import TrendSummary
logger = logging.getLogger("projection")
@@ -169,10 +169,8 @@ def project_macro_decay(
# Decay factor: ratio of future impact to current impact
if half_life > 0:
current_factor = math.pow(2.0, -current_age_days / half_life)
future_factor = math.pow(2.0, -future_age_days / half_life)
else:
current_factor = 0.0
future_factor = 0.0
severity_w = _SEVERITY_WEIGHT.get(ev.severity, 0.25)
+10 -11
View File
@@ -27,6 +27,12 @@ from services.aggregation.evidence import (
rank_evidence as _rank_evidence_composite,
)
from services.aggregation.market_context import fetch_market_context
from services.aggregation.pattern_matcher import find_self_patterns
from services.aggregation.projection import (
MacroEventInfo,
compute_projection,
persist_trend_projection,
)
from services.aggregation.scoring import (
ScoringConfig,
WeightedSignal,
@@ -34,23 +40,16 @@ from services.aggregation.scoring import (
sentiment_to_numeric,
weighted_sentiment_average,
)
from services.aggregation.signal_propagation import (
CompetitiveSignalRecord,
build_pattern_weighted_signals,
)
from services.shared.metrics import (
AGGREGATION_CONTRADICTION_SCORE,
AGGREGATION_DURATION,
AGGREGATION_SIGNALS_PROCESSED,
AGGREGATION_WINDOWS_COMPUTED,
)
from services.aggregation.pattern_matcher import find_self_patterns
from services.aggregation.projection import (
MacroEventInfo,
TrendProjection,
compute_projection,
persist_trend_projection,
)
from services.aggregation.signal_propagation import (
CompetitiveSignalRecord,
build_pattern_weighted_signals,
)
from services.shared.schemas import TrendDirection, TrendSummary, TrendWindow
logger = logging.getLogger(__name__)