fix: 修复2个ruff F401未使用import错误(BGM PR引入) #773

Merged
xiaoxia merged 1 commits from fix/develop-ruff-f401 into develop 2026-07-23 20:44:36 +08:00
Owner

问题

develop分支Push CI的Validate - Code Quality失败,2个ruff F401错误(未使用import),来自#763 BGM PR。

修复

  • apps/api/app/api/routes/ai.py: 删除未使用的Optional import(使用了from future import annotations)
  • apps/api/app/api/routes/generation_tasks.py: 删除未使用的SmartAssetSelector import

仅删未用import,不动业务逻辑。

## 问题 develop分支Push CI的Validate - Code Quality失败,2个ruff F401错误(未使用import),来自#763 BGM PR。 ## 修复 - apps/api/app/api/routes/ai.py: 删除未使用的Optional import(使用了from __future__ import annotations) - apps/api/app/api/routes/generation_tasks.py: 删除未使用的SmartAssetSelector import 仅删未用import,不动业务逻辑。
xiaoxia added 1 commit 2026-07-23 20:29:59 +08:00
fix: 修复2个ruff F401未使用import错误(BGM PR引入)
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 16s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 32s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m26s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m36s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 25s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
AI Code Review / AI Code Review (pull_request) Successful in 2m17s
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 11s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m5s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 5m2s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 4m21s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Successful in 3m20s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 4m46s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 10m14s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 12s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 47m58s
e15addcc34
Collaborator

📊 审查概览

  • 整体评价:通过
  • 严重问题数量:0 个
  • 一般建议数量:0 个

需修改的问题(严重)

💡 改进建议(一般)

良好实践

  1. 清理未使用的导入:移除了 ai.py 中未使用的 Optionalgeneration_tasks.py 中未使用的 SmartAssetSelector,有助于减少代码依赖,保持代码库整洁。

格式检查通过 | 逻辑审查通过 | 性能良好


🤖 由 AI 代码审查机器人自动生成 | 2026-07-23 12:33:56 | 模型:

### 📊 审查概览 - 整体评价:通过 - 严重问题数量:0 个 - 一般建议数量:0 个 ### ❌ 需修改的问题(严重) 无 ### 💡 改进建议(一般) 无 ### ✅ 良好实践 1. **清理未使用的导入**:移除了 `ai.py` 中未使用的 `Optional` 和 `generation_tasks.py` 中未使用的 `SmartAssetSelector`,有助于减少代码依赖,保持代码库整洁。 --- ✅ 格式检查通过 | ✅ 逻辑审查通过 | ✅ 性能良好 --- <sub>🤖 由 AI 代码审查机器人自动生成 | 2026-07-23 12:33:56 | 模型: </sub> <!-- AI_CODE_REVIEW_AUTO_COMMENT -->
xiaoxia merged commit 081e58e5a0 into develop 2026-07-23 20:44:36 +08:00

🗑️ 预览环境已清理

PR #773 已关闭或合并,对应的预览环境已被清理。

如有需要,可以重新打开 PR 来重新生成预览环境。

🗑️ **预览环境已清理** PR #773 已关闭或合并,对应的预览环境已被清理。 > 如有需要,可以重新打开 PR 来重新生成预览环境。
Sign in to join this conversation.