style: apply ruff format across backend + scripts (line-length 100)

Mechanical, whole-tree `ruff format` pass — no behaviour change. Recorded in
.git-blame-ignore-revs (next commit) so git blame skips it.
This commit is contained in:
2026-08-23 07:43:06 +02:00
parent 434a98d6ed
commit b1832afd18
217 changed files with 3149 additions and 1744 deletions
+5 -4
View File
@@ -4,6 +4,7 @@ Channel/video data is shared across users, so background work acts through a "se
user" (any user with a stored refresh token) unless a YOUTUBE_API_KEY is configured for
public reads.
"""
import logging
import threading
from concurrent.futures import ThreadPoolExecutor, as_completed
@@ -173,9 +174,7 @@ def run_recent_backfill(
return {"channels_processed": 0, "videos_added": 0, "reason": "no service user"}
if channels is None:
channels = (
db.execute(select(Channel).where(Channel.recent_synced_at.is_(None)))
.scalars()
.all()
db.execute(select(Channel).where(Channel.recent_synced_at.is_(None))).scalars().all()
)
if max_channels:
channels = channels[:max_channels]
@@ -325,7 +324,9 @@ def estimate_deep_backfill(db: Session, channels: list[Channel]) -> dict:
total_units = sum(units(c) for c in pending)
daily_budget = max(
1, sysconfig.get_int(db, "quota_daily_budget") - sysconfig.get_int(db, "backfill_quota_reserve")
1,
sysconfig.get_int(db, "quota_daily_budget")
- sysconfig.get_int(db, "backfill_quota_reserve"),
)
eta_seconds = int(total_units / daily_budget * 86_400) if pending else 0
return {