From 49678120e9033ec52cddb4bb64bb60407078db57 Mon Sep 17 00:00:00 2001 From: CI Bot Date: Wed, 30 Sep 2026 09:12:30 +0000 Subject: [PATCH] style: auto-format with black + isort + ruff + prettier [skip ci-format-check] --- apps/worker/worker_app/tasks/viral_video.py | 6 ++++-- tests/unit/test_viral_video_p0.py | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/worker/worker_app/tasks/viral_video.py b/apps/worker/worker_app/tasks/viral_video.py index 3e9375b95..6ebedcb07 100644 --- a/apps/worker/worker_app/tasks/viral_video.py +++ b/apps/worker/worker_app/tasks/viral_video.py @@ -381,6 +381,7 @@ def _step_tts(job: ViralVideoJob, copy_text: str): """步骤 6: CosyVoice 配音。P1:返回 Path;失败返回 None。""" try: from pathlib import Path as _Path + from services.tts_service_factory import get_tts_service tts_service = get_tts_service() @@ -432,8 +433,9 @@ def _step_render(job, storyboard, tts_path, bgm): import tempfile from pathlib import Path - from packages.shared.ai_service import call_video_generation from video_processing.concat_engine import concat_video_files + + from packages.shared.ai_service import call_video_generation from packages.shared.ffmpeg_utils import run_ffmpeg if not storyboard: @@ -527,8 +529,8 @@ def _step_render(job, storyboard, tts_path, bgm): def _probe_ok(video_path: str) -> bool: - from pathlib import Path as _Path import subprocess + from pathlib import Path as _Path try: if not _Path(video_path).exists(): diff --git a/tests/unit/test_viral_video_p0.py b/tests/unit/test_viral_video_p0.py index 188b70d4b..7417b9d84 100644 --- a/tests/unit/test_viral_video_p0.py +++ b/tests/unit/test_viral_video_p0.py @@ -238,6 +238,7 @@ class TestResumeReadsImageAnalysis: def test_resume_uses_persisted_image_analysis(self): """resume_pipeline 应从 job.image_analysis 读(P0-3 持久化)。""" import inspect + from apps.worker.worker_app.tasks import viral_video as vv src = inspect.getsource(vv.resume_viral_video_pipeline)