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:
@@ -1,6 +1,7 @@
|
||||
"""R6 S1b: the request models turn payloads that used to 500 into clean validation errors,
|
||||
and PATCH models distinguish an absent field from an explicit null. Pure-logic (no DB) — it
|
||||
exercises the Pydantic models the route modules define, not the endpoints."""
|
||||
|
||||
import pytest
|
||||
from pydantic import ValidationError
|
||||
|
||||
@@ -13,6 +14,7 @@ from app.routes.tags import TagUpdateIn
|
||||
|
||||
# --- The three ROADMAP-named 500-producers are now 422s (ValidationError at the boundary). ---
|
||||
|
||||
|
||||
def test_channel_priority_rejects_non_numeric():
|
||||
# Was `int(payload["priority"])` → 500 on garbage. Now a validation error.
|
||||
with pytest.raises(ValidationError):
|
||||
@@ -58,6 +60,7 @@ def test_progress_accepts_fractional_seconds():
|
||||
|
||||
# --- PATCH models: model_fields_set separates "absent" from "explicit null". ---
|
||||
|
||||
|
||||
def test_tag_update_absent_vs_null_color():
|
||||
absent = TagUpdateIn()
|
||||
assert "color" not in absent.model_fields_set # untouched on PATCH
|
||||
|
||||
Reference in New Issue
Block a user