ruff: Fix RUF015 Prefer `next(iter(…))` over `list(…)[0]`.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-07-19 14:03:05 -07:00 committed by Tim Abbott
parent 9bb3d15a79
commit 0efc662eab
1 changed files with 1 additions and 1 deletions

View File

@ -531,7 +531,7 @@ def send_peer_subscriber_events(
# This optimization depends on all public streams
# having the same peers for any single user, which
# isn't the case for private streams.
altered_user_id = list(altered_user_ids)[0]
[altered_user_id] = altered_user_ids
user_streams[altered_user_id].add(stream_id)
else:
event = dict(