diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-09-20 07:48:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-20 07:48:55 -0400 |
commit | 7ec0a141b4bdda0fa67cb1f2af7f321b9963f0b8 (patch) | |
tree | 8a500d3fce31d337d50d43c75df70d243371acb2 /synapse/handlers/relations.py | |
parent | Return immutable objects for cachedList decorators (#16350) (diff) | |
download | synapse-7ec0a141b4bdda0fa67cb1f2af7f321b9963f0b8.tar.xz |
Convert more cached return values to immutable types (#16356)
Diffstat (limited to 'synapse/handlers/relations.py')
-rw-r--r-- | synapse/handlers/relations.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/synapse/handlers/relations.py b/synapse/handlers/relations.py index db97f7aede..9b13448cdd 100644 --- a/synapse/handlers/relations.py +++ b/synapse/handlers/relations.py @@ -13,7 +13,17 @@ # limitations under the License. import enum import logging -from typing import TYPE_CHECKING, Collection, Dict, FrozenSet, Iterable, List, Optional +from typing import ( + TYPE_CHECKING, + Collection, + Dict, + FrozenSet, + Iterable, + List, + Mapping, + Optional, + Sequence, +) import attr @@ -245,7 +255,7 @@ class RelationsHandler: async def get_references_for_events( self, event_ids: Collection[str], ignored_users: FrozenSet[str] = frozenset() - ) -> Dict[str, List[_RelatedEvent]]: + ) -> Mapping[str, Sequence[_RelatedEvent]]: """Get a list of references to the given events. Args: |