mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-01 12:56:34 +08:00
fix(types): preserve sequence contract for async transfer statistics
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import time
|
||||
from collections.abc import Sequence
|
||||
from typing import Any, List, Optional, cast
|
||||
|
||||
from sqlalchemy import delete as sqlalchemy_delete
|
||||
@@ -358,7 +359,7 @@ class TransferHistoryOper(DbOper):
|
||||
lambda session: TransferHistory.statistic(session, days)
|
||||
)
|
||||
|
||||
async def async_statistic(self, days: int = 7) -> List[Any]:
|
||||
async def async_statistic(self, days: int = 7) -> Sequence[Any]:
|
||||
"""异步统计最近若干天的整理历史数量。"""
|
||||
return await self._execute_async_query(
|
||||
lambda session: TransferHistory.async_statistic(session, days)
|
||||
|
||||
Reference in New Issue
Block a user