fix(lint): ruff auto-fix + lewooogo-core src 加入 git

- Python: ruff --fix 修復 280 個 lint 錯誤
- lewooogo-core: src/ 目錄未追蹤,導致 CI eslint 失敗

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-03-23 23:51:37 +08:00
parent f78aab8b2a
commit 6f049877fc
68 changed files with 366 additions and 358 deletions

View File

@@ -17,7 +17,7 @@ NOTE: 此模組為 lewooogo-brain/adapters/incident_memory.py 的 apps/api 內
待 Phase 6.4i 完成 monorepo Docker 解法後,將直接引用 lewooogo-brain 套件
"""
from datetime import datetime, timezone, timedelta
from datetime import UTC, datetime, timedelta
from typing import Any, Protocol
import structlog
@@ -334,7 +334,7 @@ class DualIncidentMemory:
return None
# Step 3: 檢查聚合窗口
window_start = datetime.now(timezone.utc) - timedelta(minutes=window_minutes)
window_start = datetime.now(UTC) - timedelta(minutes=window_minutes)
if incident.updated_at < window_start:
# 超出聚合窗口,不聚合
logger.debug(