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:
@@ -5,6 +5,7 @@ the asset bookkeeping (release, error-reset, fresh-asset rebuild). This pins the
|
||||
behaviour so the logic can move into `service.*` methods (with the routes as thin callers) provably
|
||||
behaviour-equivalently. DB lane (`db` fixture) — skipped without Postgres.
|
||||
"""
|
||||
|
||||
from sqlalchemy import text
|
||||
|
||||
from app.models import DownloadJob, MediaAsset, User
|
||||
@@ -15,14 +16,23 @@ def _seed(db, *, job_status, asset_status="ready", ref_count=1, rel_path=None):
|
||||
db.add(u)
|
||||
db.flush()
|
||||
asset = MediaAsset(
|
||||
source_kind="url", source_ref=f"r-{u.id}", format_sig="s",
|
||||
status=asset_status, ref_count=ref_count, rel_path=rel_path,
|
||||
source_kind="url",
|
||||
source_ref=f"r-{u.id}",
|
||||
format_sig="s",
|
||||
status=asset_status,
|
||||
ref_count=ref_count,
|
||||
rel_path=rel_path,
|
||||
)
|
||||
db.add(asset)
|
||||
db.flush()
|
||||
job = DownloadJob(
|
||||
user_id=u.id, asset_id=asset.id, source_kind="url", source_ref="r",
|
||||
status=job_status, queue_pos=1, profile_snapshot={},
|
||||
user_id=u.id,
|
||||
asset_id=asset.id,
|
||||
source_kind="url",
|
||||
source_ref="r",
|
||||
status=job_status,
|
||||
queue_pos=1,
|
||||
profile_snapshot={},
|
||||
)
|
||||
db.add(job)
|
||||
db.commit()
|
||||
|
||||
Reference in New Issue
Block a user