style: format backend with black

Also drops the session-sliding comment in login_required.
This commit is contained in:
2026-10-02 14:46:16 -05:00
parent 2512c67893
commit 63c9991421
14 changed files with 320 additions and 82 deletions
+6 -1
View File
@@ -1,4 +1,5 @@
"""Request validation shared by every slice. Errors carry a status, a fix-it message, and the field."""
from flask import request
@@ -28,7 +29,11 @@ def require_utf8(value: str, field: str) -> None:
try:
value.encode("utf-8")
except UnicodeEncodeError:
raise ApiError(400, f"{field} contains unpaired surrogate characters; send valid UTF-8 text", field) from None
raise ApiError(
400,
f"{field} contains unpaired surrogate characters; send valid UTF-8 text",
field,
) from None
def text(body: dict, field: str, max_len: int) -> str: