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

Commit

Permalink
Convert frozendict to dict.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Aug 24, 2020
1 parent 28d4b8a commit 6f5515b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions synapse/state/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6f5515b

Please sign in to comment.