From 6f5515b462a41b664e15c458f9e8b8bcbcd38f03 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Mon, 24 Aug 2020 14:03:07 -0400 Subject: [PATCH] Convert frozendict to dict. --- synapse/state/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/synapse/state/__init__.py b/synapse/state/__init__.py index 9a4a7c7bbd26..a601303fa34e 100644 --- a/synapse/state/__init__.py +++ b/synapse/state/__init__.py @@ -205,8 +205,7 @@ async def get_current_state_ids( logger.debug("calling resolve_state_groups from get_current_state_ids") ret = await self.resolve_state_groups_for_events(room_id, latest_event_ids) - # mypy doesn't like that this returns a frozendict instead of a dict. - return ret.state # type: ignore + return dict(ret.state) async def get_current_users_in_room( self, room_id: str, latest_event_ids: Optional[List[str]] = None @@ -316,8 +315,7 @@ async def compute_event_context( event.room_id, event.prev_event_ids() ) - # mypy doesn't like that this is a frozendict, not a dict. - state_ids_before_event = entry.state # type: ignore + state_ids_before_event = dict(entry.state) state_group_before_event = entry.state_group state_group_before_event_prev_group = entry.prev_group deltas_to_state_group_before_event = entry.delta_ids