chore: 死代码与重复逻辑清理
删除未引用/未调用符号: - PredictionRepository(无引用) - is_correct_1x2(无调用者) - LeagueOut(路由用 list[dict]) - IngestResponse(IngestBzzoiroResponse 已替代) - SecurityCheckError(从未 raise,assert_security_on_startup 用 sys.exit) - short_write(仅自引用,全仓库无外部调用) - fetchIngestJobs(列表函数无页面使用,单数 fetchIngestJob 仍保留) - clear_prompt_cache(无入口) 去重: - eval._actual_1x2 改为委托 utils.actual_1x2(单一权威源) 全量测试 270 通过,业务行为不变。
This commit is contained in:
+3
-6
@@ -7,6 +7,7 @@ from sqlalchemy import func, or_, select
|
||||
|
||||
from src.db.models import Prediction, Match, League
|
||||
from src.db.unit_of_work import get_uow
|
||||
from src.llm.utils import actual_1x2
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -33,12 +34,8 @@ async def settle_prediction(prediction_id: int, home_goals: int, away_goals: int
|
||||
|
||||
|
||||
def _actual_1x2(home: int, away: int) -> str:
|
||||
"""根据实际比分返胜平负。"""
|
||||
if home > away:
|
||||
return "1"
|
||||
if home == away:
|
||||
return "X"
|
||||
return "2"
|
||||
"""根据实际比分返胜平负(委托 utils.actual_1x2 单一权威源)。"""
|
||||
return actual_1x2(home, away)
|
||||
|
||||
|
||||
def _build_filters(
|
||||
|
||||
Reference in New Issue
Block a user