Make lint-backend green, and regenerate the stale client

`wanted_names` never read its `previous` argument — the caller reassigns
`wanted` from the return value — so the parameter goes rather than gaining
an underscore; its one call site and four test calls follow. Sorts the
imports in test_artifacts.py. Both were failing `make lint-backend` at HEAD.

Regenerates the client, which 8c097d9 left behind when it corrected the
revoke_client docstring.
This commit is contained in:
2026-09-06 15:29:35 +02:00
parent fa5ce4f694
commit 6fdc30a4d1
4 changed files with 11 additions and 12 deletions
+4 -4
View File
@@ -944,11 +944,11 @@ def test_a_socket_pushes_only_the_frames_it_was_asked_for(tmp_path) -> None:
asking = orjson.dumps({"type": "media", "names": ["cam.frame", "other.frame"]})
# A person's socket gets what it asked for; a panel's is intersected with
# what it draws, so naming a message is not a way around the scope.
assert wanted_names(asking.decode(), None, set()) == {"cam.frame", "other.frame"}
assert wanted_names(asking.decode(), {"cam.frame"}, set()) == {"cam.frame"}
assert wanted_names(asking.decode(), None) == {"cam.frame", "other.frame"}
assert wanted_names(asking.decode(), {"cam.frame"}) == {"cam.frame"}
# Anything else on this socket leaves the set alone.
assert wanted_names('{"type":"ping"}', None, set()) is None
assert wanted_names("not json", None, set()) is None
assert wanted_names('{"type":"ping"}', None) is None
assert wanted_names("not json", None) is None
events = [
{"type": "message_value", "name": "cam.frame", "value": frame, "ts": 1.0},