chore: type and tidy the remaining site scripts

This commit is contained in:
Abdessamad Derraz committed 2026-11-17 09:33:10 +01:00
1 parent a6985449b3
commit f2b7118fe3
5 files changed
+33 -16

No files matched your search

+1 -1
View File
@@ -91,7 +91,7 @@ def square_image(data: bytes, size: int, kind: str = "PNG", flip: bool = False,
def is_svg(data: bytes) -> bool:
head = data[:512].lstrip().lower()
return head.startswith(b"<?xml") or head.startswith(b"<svg")
return head.startswith((b"<?xml", b"<svg"))
def safe_svg(data: bytes, url: str) -> bytes: