mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
ruff: Fix PERF401 Use a list comprehension to create a transformed list.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
0b95d83f09
commit
562a79ab76
@@ -1162,9 +1162,7 @@ def update_message_flags(client: Client) -> None:
|
||||
"topic": "Castle",
|
||||
"content": "I come not, friends, to steal away your hearts.",
|
||||
}
|
||||
message_ids = []
|
||||
for i in range(0, 3):
|
||||
message_ids.append(client.send_message(request)["id"])
|
||||
message_ids = [client.send_message(request)["id"] for i in range(3)]
|
||||
|
||||
# {code_example|start}
|
||||
# Add the "read" flag to the messages with IDs in "message_ids"
|
||||
|
||||
Reference in New Issue
Block a user