fix: auto-fix code issues (cron)

- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
This commit is contained in:
AutoFix Bot
2026-03-03 06:03:38 +08:00
parent 2a0ed6af4d
commit 9fd1da8fb7
41 changed files with 901 additions and 768 deletions

View File

@@ -181,14 +181,14 @@ async def test_predictions(trend_model_id: str, anomaly_model_id: str) -> None:
# 2. 趋势预测
print("2. 趋势预测...")
trend_result = await manager.predict(
trend_model_id, {"historical_values": [10, 12, 15, 14, 18, 20, 22]}
trend_model_id, {"historical_values": [10, 12, 15, 14, 18, 20, 22]},
)
print(f" 预测结果: {trend_result.prediction_data}")
# 3. 异常检测
print("3. 异常检测...")
anomaly_result = await manager.predict(
anomaly_model_id, {"value": 50, "historical_values": [10, 12, 11, 13, 12, 14, 13]}
anomaly_model_id, {"value": 50, "historical_values": [10, 12, 11, 13, 12, 14, 13]},
)
print(f" 检测结果: {anomaly_result.prediction_data}")