From a22ee766da2dbf2870b1e27eff80227d853f05e1 Mon Sep 17 00:00:00 2001 From: OG T Date: Thu, 26 Mar 2026 10:16:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(tests):=20=E4=BF=AE=E5=BE=A9=20lint=20?= =?UTF-8?q?=E9=8C=AF=E8=AA=A4=20(I001,=20F401)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - test_smart_router.py: 移除未使用的 pytest import - test_github_webhook.py: 修正 import 排序 Co-Authored-By: Claude Opus 4.5 --- apps/api/tests/test_github_webhook.py | 10 +++++----- apps/api/tests/test_smart_router.py | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/api/tests/test_github_webhook.py b/apps/api/tests/test_github_webhook.py index bafd46d1..cb8fbf58 100644 --- a/apps/api/tests/test_github_webhook.py +++ b/apps/api/tests/test_github_webhook.py @@ -16,17 +16,17 @@ import hmac import json import os -import httpx -import pytest -from httpx import ASGITransport - # 設定測試環境變數 (在 import main 之前) os.environ.setdefault("MOCK_MODE", "true") os.environ.setdefault("ENVIRONMENT", "dev") os.environ.setdefault("GITHUB_WEBHOOK_SECRET", "test-secret-key-12345") os.environ.setdefault("GITHUB_ALLOWED_REPOS", "test-owner/test-repo,wooo-ai/awoooi") -from src.main import app # noqa: E402 +import httpx +import pytest +from httpx import ASGITransport + +from src.main import app # ============================================================================= diff --git a/apps/api/tests/test_smart_router.py b/apps/api/tests/test_smart_router.py index c57cebef..fcabf37a 100644 --- a/apps/api/tests/test_smart_router.py +++ b/apps/api/tests/test_smart_router.py @@ -4,8 +4,6 @@ Smart Router Tests - Phase 13.3 測試意圖分類、複雜度評分、AI 路由 """ -import pytest - from src.services.intent_classifier import ( IntentClassifier, IntentType,