From dcec37d326623cf2130092ee34efdfe12fd3b2c4 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sat, 5 Sep 2026 08:31:28 +0800 Subject: [PATCH] fix(download): keep resolver type import static-only --- app/chain/download/subtitle.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/chain/download/subtitle.py b/app/chain/download/subtitle.py index 1376924da..69c6b8100 100644 --- a/app/chain/download/subtitle.py +++ b/app/chain/download/subtitle.py @@ -4,7 +4,7 @@ import re import shutil import time from pathlib import Path -from typing import Any, Callable, List, Optional, Tuple, Union, cast +from typing import TYPE_CHECKING, Any, Callable, List, Optional, Tuple, Union, cast from app.application.classification.reference import ( append_classification_category_path, @@ -32,11 +32,13 @@ from app.runtime.log import logger from app.schemas.file import FileItem as _SchemaFileItem from app.schemas.file import FileURI from app.schemas.system import TransferDirectoryConf as _SchemaTransferDirectoryConf -from app.schemas.transfer import DownloaderTorrent from app.schemas.types import ( MediaSource, ) +if TYPE_CHECKING: + from app.schemas.transfer import DownloaderTorrent + def _append_download_classification_path( root_path: Path,