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 @@ already-JPEG thumbnails (Reddit serves a JPEG under a `.png` name) — and becau
|
||||
error is fatal, it used to fail the WHOLE download. The key regression property here is that a bad
|
||||
thumbnail returns None (poster falls back to a cut frame) instead of raising.
|
||||
"""
|
||||
|
||||
import shutil
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
@@ -25,8 +26,19 @@ def _is_jpeg(p: Path) -> bool:
|
||||
def test_converts_a_png_to_a_real_jpeg(tmp_path):
|
||||
src = tmp_path / "thumb.png"
|
||||
subprocess.run(
|
||||
["ffmpeg", "-y", "-loglevel", "error", "-f", "lavfi",
|
||||
"-i", "color=c=red:s=64x64", "-frames:v", "1", str(src)],
|
||||
[
|
||||
"ffmpeg",
|
||||
"-y",
|
||||
"-loglevel",
|
||||
"error",
|
||||
"-f",
|
||||
"lavfi",
|
||||
"-i",
|
||||
"color=c=red:s=64x64",
|
||||
"-frames:v",
|
||||
"1",
|
||||
str(src),
|
||||
],
|
||||
check=True,
|
||||
)
|
||||
out = edit.thumbnail_to_jpg(src, tmp_path / "poster.jpg")
|
||||
|
||||
Reference in New Issue
Block a user