diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-09-19 15:26:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-19 15:26:44 -0400 |
commit | d7c89c5908f714aa6a142a89da08fafc597ffe0e (patch) | |
tree | cede0e064ca43482813fa7f6142793c85fb68800 /synapse/storage/databases/main/state.py | |
parent | Merge branch 'release-v1.93' into develop (diff) | |
download | synapse-d7c89c5908f714aa6a142a89da08fafc597ffe0e.tar.xz |
Return immutable objects for cachedList decorators (#16350)
Diffstat (limited to 'synapse/storage/databases/main/state.py')
-rw-r--r-- | synapse/storage/databases/main/state.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/state.py b/synapse/storage/databases/main/state.py index ebb2ae964f..5eaaff5b68 100644 --- a/synapse/storage/databases/main/state.py +++ b/synapse/storage/databases/main/state.py @@ -14,7 +14,17 @@ # limitations under the License. import collections.abc import logging -from typing import TYPE_CHECKING, Any, Collection, Dict, Iterable, Optional, Set, Tuple +from typing import ( + TYPE_CHECKING, + Any, + Collection, + Dict, + Iterable, + Mapping, + Optional, + Set, + Tuple, +) import attr @@ -372,7 +382,7 @@ class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore): ) async def _get_state_group_for_events( self, event_ids: Collection[str] - ) -> Dict[str, int]: + ) -> Mapping[str, int]: """Returns mapping event_id -> state_group. Raises: |