mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
python: Replace unnecessary intermediate lists with generators.
Mostly suggested by the flake8-comprehension plugin. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
1ded51aa9d
commit
ab120a03bc
@@ -332,7 +332,7 @@ class EventQueue:
|
||||
virtual_id_map: Dict[str, Dict[str, Any]] = {}
|
||||
for event_type in self.virtual_events:
|
||||
virtual_id_map[self.virtual_events[event_type]["id"]] = self.virtual_events[event_type]
|
||||
virtual_ids = sorted(list(virtual_id_map.keys()))
|
||||
virtual_ids = sorted(virtual_id_map.keys())
|
||||
|
||||
# Merge the virtual events into their final place in the queue
|
||||
index = 0
|
||||
|
||||
Reference in New Issue
Block a user