style: repo-wide lint pass — make the lint gate green again

Push builds have been RED on the lint step since ~build 209 from accumulated
formatting drift. This is the mechanical cleanup: ruff format + ruff --fix
(UP038 isinstance unions, SIM105 contextlib.suppress, UP031 f-strings, SIM115
tempfile context manager), shfmt -i 2 -ci, nixpkgs-fmt/statix/deadnix (merged
attrsets, dropped unused lib args), yamllint, and shell quoting fixes in
tests/lasuite-docs/setup_custom_tests.sh. No behaviour changes intended;
lint: PASS, unit tests: 138 passed.
This commit is contained in:
2026-06-09 21:56:15 +00:00
parent e76d4005ab
commit 9a7772563a
115 changed files with 952 additions and 660 deletions

View File

@ -88,14 +88,14 @@ def _ingest_and_count(
Returns the events_v2 row count for (pathname, name). Raises if nothing lands within max_wait —
a genuinely-broken ingestion path therefore FAILS (this is not a vacuous check)."""
_register_site(base_domain, site)
count_sql = (
f"SELECT count() FROM events_v2 WHERE pathname = '{pathname}' AND name = '{name}'"
)
count_sql = f"SELECT count() FROM events_v2 WHERE pathname = '{pathname}' AND name = '{name}'"
deadline = time.time() + max_wait
last_status = None
while True:
last_status = _post_event(base_domain, site, name, pathname)
assert last_status == 202, f"POST /api/event for {name!r} → HTTP {last_status} (expected 202)"
assert (
last_status == 202
), f"POST /api/event for {name!r} → HTTP {last_status} (expected 202)"
time.sleep(interval)
raw = _ch(base_domain, count_sql)
count = int(raw) if raw.isdigit() else 0
@ -143,4 +143,6 @@ def test_custom_event_roundtrip(live_app):
live_app,
f"SELECT name FROM events_v2 WHERE pathname = '{pathname}' LIMIT 1",
)
assert stored_name == event_name, f"custom event stored as {stored_name!r}, expected {event_name!r}"
assert (
stored_name == event_name
), f"custom event stored as {stored_name!r}, expected {event_name!r}"