mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-10-28 19:06:36 +08:00
fix(migrations): follow torrent capability owner
This commit is contained in:
@@ -7,7 +7,7 @@ Create Date: 2025-02-14 19:02:24.989349
|
||||
"""
|
||||
|
||||
from app.adapters.cache.backends import configure_platform_cache
|
||||
from app.application.torrent import clear_torrent_cache
|
||||
from app.application.torrent.download import clear_torrent_cache
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '279a949d81b6'
|
||||
|
||||
@@ -381,12 +381,16 @@ def test_application_torrent_uses_same_named_single_word_package() -> None:
|
||||
assert len(init_tree.body) == 1
|
||||
|
||||
root_imports: list[str] = []
|
||||
for path in APP_ROOT.rglob("*.py"):
|
||||
for root in (APP_ROOT, PROJECT_ROOT / "database"):
|
||||
for path in root.rglob("*.py"):
|
||||
if path.is_relative_to(APP_ROOT / "plugins"):
|
||||
continue
|
||||
tree = ast.parse(path.read_text(encoding="utf-8-sig"), filename=str(path))
|
||||
for node in ast.walk(tree):
|
||||
if isinstance(node, ast.ImportFrom) and node.module == "app.application.torrent":
|
||||
if (
|
||||
isinstance(node, ast.ImportFrom)
|
||||
and node.module == "app.application.torrent"
|
||||
):
|
||||
root_imports.append(
|
||||
f"{path.relative_to(PROJECT_ROOT).as_posix()}:{node.lineno}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user