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:
@@ -20,7 +20,7 @@ C-Suite 戰略會議決議 (2026-03-22):
|
||||
- Semantic Memory (Vector DB): 向量化後的知識,供 RAG 檢索
|
||||
"""
|
||||
|
||||
from datetime import datetime, timezone
|
||||
from datetime import UTC, datetime
|
||||
from enum import Enum
|
||||
from typing import Literal
|
||||
from uuid import UUID, uuid4
|
||||
@@ -30,7 +30,6 @@ from pydantic import BaseModel, Field
|
||||
# 復用現有模型 (避免重複定義)
|
||||
from src.models.approval import BlastRadius
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# Incident 專用 Enums
|
||||
# =============================================================================
|
||||
@@ -280,7 +279,7 @@ class Incident(BaseModel):
|
||||
|
||||
# === 識別 ===
|
||||
incident_id: str = Field(
|
||||
default_factory=lambda: f"INC-{datetime.now(timezone.utc).strftime('%Y%m%d')}-{str(uuid4())[:6].upper()}",
|
||||
default_factory=lambda: f"INC-{datetime.now(UTC).strftime('%Y%m%d')}-{str(uuid4())[:6].upper()}",
|
||||
description="事件唯一識別碼 (如 INC-20260322-A1B2C3)",
|
||||
)
|
||||
|
||||
@@ -322,11 +321,11 @@ class Incident(BaseModel):
|
||||
|
||||
# === 時間軸 ===
|
||||
created_at: datetime = Field(
|
||||
default_factory=lambda: datetime.now(timezone.utc),
|
||||
default_factory=lambda: datetime.now(UTC),
|
||||
description="事件建立時間",
|
||||
)
|
||||
updated_at: datetime = Field(
|
||||
default_factory=lambda: datetime.now(timezone.utc),
|
||||
default_factory=lambda: datetime.now(UTC),
|
||||
description="最後更新時間",
|
||||
)
|
||||
resolved_at: datetime | None = Field(
|
||||
|
||||
Reference in New Issue
Block a user