style: 统一 Ruff 代码格式

This commit is contained in:
yml2213
2026-08-30 21:04:52 +08:00
parent c891ac982e
commit 47e19ed7b2
90 changed files with 5574 additions and 2350 deletions
+4 -2
View File
@@ -20,8 +20,10 @@ from typing import TYPE_CHECKING
if TYPE_CHECKING:
from .huya_runner import HuyaBatchRunner
class HuyaBatchRunnerCore:
"""虎牙任务执行器公共基础:批次状态、日志、任务落库。"""
def __init__(
self,
db: Session,
@@ -156,7 +158,8 @@ class HuyaBatchRegistry:
expired = [
batch_id
for batch_id, batch in self._batches.items()
if batch.get("finished") and now - float(batch.get("finished_at") or now) > ttl_seconds
if batch.get("finished")
and now - float(batch.get("finished_at") or now) > ttl_seconds
]
for batch_id in expired:
self._batches.pop(batch_id, None)
@@ -206,4 +209,3 @@ class HuyaBatchRegistry:
huya_batch_registry = HuyaBatchRegistry()