summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-05-10 14:10:22 -0400
committerGitHub <noreply@github.com>2022-05-10 14:10:22 -0400
commit29f06704b8871a44926f7c99e73cf4a978fb8e81 (patch)
tree03005d5e4165092a4efe84bbcec276b6ba128bd3 /synapse/api
parentAdd some type hints to datastore. (#12477) (diff)
downloadsynapse-29f06704b8871a44926f7c99e73cf4a978fb8e81.tar.xz
Fix incorrect type hint in filtering code. (#12695)
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/filtering.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py
index 4a808e33fe..b91ce06de7 100644
--- a/synapse/api/filtering.py
+++ b/synapse/api/filtering.py
@@ -19,6 +19,7 @@ from typing import (
     TYPE_CHECKING,
     Awaitable,
     Callable,
+    Collection,
     Dict,
     Iterable,
     List,
@@ -444,9 +445,9 @@ class Filter:
         return room_ids
 
     async def _check_event_relations(
-        self, events: Iterable[FilterEvent]
+        self, events: Collection[FilterEvent]
     ) -> List[FilterEvent]:
-        # The event IDs to check, mypy doesn't understand the ifinstance check.
+        # The event IDs to check, mypy doesn't understand the isinstance check.
         event_ids = [event.event_id for event in events if isinstance(event, EventBase)]  # type: ignore[attr-defined]
         event_ids_to_keep = set(
             await self._store.events_have_relations(