fix(api): 修復 34 個 Ruff lint 錯誤

- 自動修復 import 排序、unused imports
- 手動修復 raise from、isinstance union、unused variable
- scripts/ 暫時保留 (非 CI 阻擋)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-03-29 15:27:49 +08:00
parent 5f9a6a7e55
commit d89f0520f9
27 changed files with 2538 additions and 1132 deletions

View File

@@ -1004,7 +1004,7 @@ class OpenClawService:
# Step 2.5: 2026-03-29 ogt - 強制 confidence 必須由 LLM 輸出
# 如果 LLM 沒有輸出 confidence強制設為 0.5 並標記為 COLLAB
if "confidence" not in data or not isinstance(data["confidence"], (int, float)):
if "confidence" not in data or not isinstance(data["confidence"], int | float):
logger.warning(
"llm_missing_confidence",
raw_confidence=data.get("confidence"),