summary refs log tree commit diff
path: root/synapse/events
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2021-11-11 17:04:44 +0000
committerGitHub <noreply@github.com>2021-11-11 17:04:44 +0000
commit6a605f4a77bebbbffa2ac812fbff4fe5f252d88e (patch)
tree9c62427e6d50de1e1e397007994aa2cc66b5229e /synapse/events
parentCorrect type hint for room_batch.py (#11310) (diff)
downloadsynapse-6a605f4a77bebbbffa2ac812fbff4fe5f252d88e.tar.xz
Get db signatures file to pass mypy (#11312)
Diffstat (limited to 'synapse/events')
-rw-r--r--synapse/events/builder.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/synapse/events/builder.py b/synapse/events/builder.py
index 4f409f31e1..eb39e0ae32 100644
--- a/synapse/events/builder.py
+++ b/synapse/events/builder.py
@@ -128,14 +128,12 @@ class EventBuilder:
             )
 
         format_version = self.room_version.event_format
+        # The types of auth/prev events changes between event versions.
+        prev_events: Union[List[str], List[Tuple[str, Dict[str, str]]]]
+        auth_events: Union[List[str], List[Tuple[str, Dict[str, str]]]]
         if format_version == EventFormatVersions.V1:
-            # The types of auth/prev events changes between event versions.
-            auth_events: Union[
-                List[str], List[Tuple[str, Dict[str, str]]]
-            ] = await self._store.add_event_hashes(auth_event_ids)
-            prev_events: Union[
-                List[str], List[Tuple[str, Dict[str, str]]]
-            ] = await self._store.add_event_hashes(prev_event_ids)
+            auth_events = await self._store.add_event_hashes(auth_event_ids)
+            prev_events = await self._store.add_event_hashes(prev_event_ids)
         else:
             auth_events = auth_event_ids
             prev_events = prev_event_ids