mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-08 07:12:04 +00:00
Fix incorrect type hint in filtering code. (#12695)
This commit is contained in:
parent
989fa33096
commit
29f06704b8
1
changelog.d/12695.misc
Normal file
1
changelog.d/12695.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fixes an incorrect type hint for `Filter._check_event_relations`.
|
@ -19,6 +19,7 @@ from typing import (
|
|||||||
TYPE_CHECKING,
|
TYPE_CHECKING,
|
||||||
Awaitable,
|
Awaitable,
|
||||||
Callable,
|
Callable,
|
||||||
|
Collection,
|
||||||
Dict,
|
Dict,
|
||||||
Iterable,
|
Iterable,
|
||||||
List,
|
List,
|
||||||
@ -444,9 +445,9 @@ class Filter:
|
|||||||
return room_ids
|
return room_ids
|
||||||
|
|
||||||
async def _check_event_relations(
|
async def _check_event_relations(
|
||||||
self, events: Iterable[FilterEvent]
|
self, events: Collection[FilterEvent]
|
||||||
) -> List[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 = [event.event_id for event in events if isinstance(event, EventBase)] # type: ignore[attr-defined]
|
||||||
event_ids_to_keep = set(
|
event_ids_to_keep = set(
|
||||||
await self._store.events_have_relations(
|
await self._store.events_have_relations(
|
||||||
|
Loading…
Reference in New Issue
Block a user