diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2022-03-04 10:25:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-04 10:25:18 +0000 |
commit | d56202b0383627fdb4e04404d62922dce16868f8 (patch) | |
tree | a192c9df8e9cb90b152ec8431920ec8135e15aa8 /synapse/storage | |
parent | Avoid generating state groups for local out-of-band leaves (#12154) (diff) | |
download | synapse-d56202b0383627fdb4e04404d62922dce16868f8.tar.xz |
Fix type of `events` in `StateGroupStorage` and `StateHandler` (#12156)
We make multiple passes over this, so a regular iterable won't do.
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/state.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py index e79ecf64a0..86f1a5373b 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -561,7 +561,7 @@ class StateGroupStorage: return state_group_delta.prev_group, state_group_delta.delta_ids async def get_state_groups_ids( - self, _room_id: str, event_ids: Iterable[str] + self, _room_id: str, event_ids: Collection[str] ) -> Dict[int, MutableStateMap[str]]: """Get the event IDs of all the state for the state groups for the given events @@ -596,7 +596,7 @@ class StateGroupStorage: return group_to_state[state_group] async def get_state_groups( - self, room_id: str, event_ids: Iterable[str] + self, room_id: str, event_ids: Collection[str] ) -> Dict[int, List[EventBase]]: """Get the state groups for the given list of event_ids @@ -648,7 +648,7 @@ class StateGroupStorage: return self.stores.state._get_state_groups_from_groups(groups, state_filter) async def get_state_for_events( - self, event_ids: Iterable[str], state_filter: Optional[StateFilter] = None + self, event_ids: Collection[str], state_filter: Optional[StateFilter] = None ) -> Dict[str, StateMap[EventBase]]: """Given a list of event_ids and type tuples, return a list of state dicts for each event. @@ -684,7 +684,7 @@ class StateGroupStorage: return {event: event_to_state[event] for event in event_ids} async def get_state_ids_for_events( - self, event_ids: Iterable[str], state_filter: Optional[StateFilter] = None + self, event_ids: Collection[str], state_filter: Optional[StateFilter] = None ) -> Dict[str, StateMap[str]]: """ Get the state dicts corresponding to a list of events, containing the event_ids |