mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 07:52:19 +00:00
ruff: Fix RUF015 Prefer next(...) over single element slice.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
4e645c8ff9
commit
3b09197fdf
@@ -453,11 +453,9 @@ def check_presence(
|
||||
assert isinstance(event["presence"], dict)
|
||||
|
||||
# Our tests only have one presence value.
|
||||
assert len(event["presence"]) == 1
|
||||
|
||||
assert list(event["presence"].keys())[0] == presence_key
|
||||
|
||||
assert list(event["presence"].values())[0]["status"] == status
|
||||
[(event_presence_key, event_presence_value)] = event["presence"].items()
|
||||
assert event_presence_key == presence_key
|
||||
assert event_presence_value["status"] == status
|
||||
|
||||
|
||||
# Type for the legacy user field; the `user_id` field is intended to
|
||||
|
||||
Reference in New Issue
Block a user