From 01e057c939c4fbd597bb965b2cea981af9d48de8 Mon Sep 17 00:00:00 2001 From: CI Bot Date: Fri, 24 Jul 2026 02:30:15 +0000 Subject: [PATCH] style: auto-format with black + isort + prettier --- .../app/api/routes/templates_editor/__init__.py | 16 +++++++--------- .../api/routes/templates_editor/adjustments.py | 5 +++-- apps/api/app/api/routes/templates_editor/bgm.py | 2 +- .../api/app/api/routes/templates_editor/clips.py | 2 +- .../api/routes/templates_editor/generation.py | 4 ++-- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/apps/api/app/api/routes/templates_editor/__init__.py b/apps/api/app/api/routes/templates_editor/__init__.py index 79222204e..c56f175b3 100755 --- a/apps/api/app/api/routes/templates_editor/__init__.py +++ b/apps/api/app/api/routes/templates_editor/__init__.py @@ -22,24 +22,22 @@ from __future__ import annotations -from fastapi import APIRouter - # 向后兼容:测试和其他模块可能直接从 templates_editor 导入这些符号 from app.auth import get_current_user # noqa: F401 from app.dependencies import get_db_session # noqa: F401 +from fastapi import APIRouter -from .dependencies import get_draft_plan_id, get_editor_services # noqa: F401 - -from .draft import router as draft_router -from .clips import router as clips_router from .adjustments import router as adjustments_router +from .ai_features import router as ai_features_router from .bgm import router as bgm_router +from .clips import router as clips_router +from .cover import router as cover_router +from .dependencies import get_draft_plan_id, get_editor_services # noqa: F401 +from .draft import router as draft_router from .effects import router as effects_router from .export import router as export_router -from .cover import router as cover_router -from .subtitles import router as subtitles_router -from .ai_features import router as ai_features_router from .generation import router as generation_router +from .subtitles import router as subtitles_router from .timeline import router as timeline_router # 主 router,所有子路由都合并到这里 diff --git a/apps/api/app/api/routes/templates_editor/adjustments.py b/apps/api/app/api/routes/templates_editor/adjustments.py index f0db8977a..734ba291c 100755 --- a/apps/api/app/api/routes/templates_editor/adjustments.py +++ b/apps/api/app/api/routes/templates_editor/adjustments.py @@ -10,14 +10,15 @@ from __future__ import annotations +from typing import Any + from app.auth import AuthenticatedUser, get_current_user from app.services.edit_plan_service import EditPlanService from app.services.edit_template_service import EditTemplateService from fastapi import APIRouter, Depends, HTTPException, status -from typing import Any +from ._utils import _build_adjust_response, _get_adjust_trim, _get_clip_config, _validate_trim from .dependencies import get_draft_plan_id, get_editor_services -from ._utils import _build_adjust_response, _get_clip_config, _get_adjust_trim, _validate_trim from .schemas import ( BatchSpeedRequest, BatchSpeedResponse, diff --git a/apps/api/app/api/routes/templates_editor/bgm.py b/apps/api/app/api/routes/templates_editor/bgm.py index d21686e7e..c056769e6 100755 --- a/apps/api/app/api/routes/templates_editor/bgm.py +++ b/apps/api/app/api/routes/templates_editor/bgm.py @@ -9,12 +9,12 @@ from __future__ import annotations import logging +from typing import Any from app.auth import AuthenticatedUser, get_current_user from app.services.edit_plan_service import EditPlanService from app.services.edit_template_service import EditTemplateService from fastapi import APIRouter, Depends, HTTPException, Query, status -from typing import Any from .dependencies import get_draft_plan_id, get_editor_services from .schemas import BGMConfigUpdateRequest diff --git a/apps/api/app/api/routes/templates_editor/clips.py b/apps/api/app/api/routes/templates_editor/clips.py index f01d3f77c..06f0242a7 100755 --- a/apps/api/app/api/routes/templates_editor/clips.py +++ b/apps/api/app/api/routes/templates_editor/clips.py @@ -16,12 +16,12 @@ from __future__ import annotations import logging +from typing import Any from app.auth import AuthenticatedUser, get_current_user from app.services.edit_plan_service import EditPlanService from app.services.edit_template_service import EditTemplateService from fastapi import APIRouter, Depends, HTTPException, Query, status -from typing import Any from .dependencies import get_draft_plan_id, get_editor_services from .schemas import ( diff --git a/apps/api/app/api/routes/templates_editor/generation.py b/apps/api/app/api/routes/templates_editor/generation.py index 317688815..f90303b43 100755 --- a/apps/api/app/api/routes/templates_editor/generation.py +++ b/apps/api/app/api/routes/templates_editor/generation.py @@ -9,6 +9,7 @@ from __future__ import annotations import logging +from typing import Any from app.auth import AuthenticatedUser, get_current_user from app.core.celery_app import celery_app @@ -23,7 +24,6 @@ from app.services.edit_plan_service import EditPlanService from app.services.edit_template_service import EditTemplateService from fastapi import APIRouter, Depends, HTTPException, status from sqlalchemy.orm import Session -from typing import Any from packages.adapters.sqlalchemy_impl.generation_task_repository import ( SQLAlchemyGenerationTaskRepository, @@ -44,8 +44,8 @@ from .dependencies import _check_queue_limits, get_draft_plan_id, get_editor_ser from .schemas import ( ClipStatusItem, EditPlanGenerateResponse, - EditPlanGenerationStatusResponse, EditPlanGenerationsResponse, + EditPlanGenerationStatusResponse, ) logger = logging.getLogger(__name__)