From f005eb2cf8cac4f02a06a606532785cbb711b88d Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 25 Feb 2022 12:39:39 +0000 Subject: [PATCH] Rename variable --- synapse/handlers/federation.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 64d55d8c0b61..4e9c2b951fe9 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -1006,19 +1006,18 @@ async def get_state_ids_for_pdu(self, room_id: str, event_id: str) -> List[str]: # get_state_groups_ids should return exactly one result assert len(state_groups) == 1 - _, state = list(state_groups.items()).pop() - results = state + _, state_map = list(state_groups.items()).pop() if event.is_state(): # Get previous state if "replaces_state" in event.unsigned: prev_id = event.unsigned["replaces_state"] if prev_id != event.event_id: - results[(event.type, event.state_key)] = prev_id + state_map[(event.type, event.state_key)] = prev_id else: - results.pop((event.type, event.state_key), None) + state_map.pop((event.type, event.state_key), None) - return list(results.values()) + return list(state_map.values()) async def on_backfill_request( self, origin: str, room_id: str, pdu_list: List[str], limit: int