Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 6f5515b

Browse files
committed
Convert frozendict to dict.
1 parent 28d4b8a commit 6f5515b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

synapse/state/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,7 @@ async def get_current_state_ids(
205205

206206
logger.debug("calling resolve_state_groups from get_current_state_ids")
207207
ret = await self.resolve_state_groups_for_events(room_id, latest_event_ids)
208-
# mypy doesn't like that this returns a frozendict instead of a dict.
209-
return ret.state # type: ignore
208+
return dict(ret.state)
210209

211210
async def get_current_users_in_room(
212211
self, room_id: str, latest_event_ids: Optional[List[str]] = None
@@ -316,8 +315,7 @@ async def compute_event_context(
316315
event.room_id, event.prev_event_ids()
317316
)
318317

319-
# mypy doesn't like that this is a frozendict, not a dict.
320-
state_ids_before_event = entry.state # type: ignore
318+
state_ids_before_event = dict(entry.state)
321319
state_group_before_event = entry.state_group
322320
state_group_before_event_prev_group = entry.prev_group
323321
deltas_to_state_group_before_event = entry.delta_ids

0 commit comments

Comments
 (0)