mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-08 23:32:21 -04:00
Use StrCollection in place of Collection[str] in (most) handlers code. (#14922)
Due to the increased safety of StrCollection over Collection[str] and Sequence[str].
This commit is contained in:
parent
dc901a885f
commit
ba79fb4a61
13 changed files with 43 additions and 58 deletions
|
@ -80,6 +80,7 @@ from synapse.types import (
|
|||
PersistedEventPosition,
|
||||
RoomStreamToken,
|
||||
StateMap,
|
||||
StrCollection,
|
||||
UserID,
|
||||
get_domain_from_id,
|
||||
)
|
||||
|
@ -615,7 +616,7 @@ class FederationEventHandler:
|
|||
|
||||
@trace
|
||||
async def backfill(
|
||||
self, dest: str, room_id: str, limit: int, extremities: Collection[str]
|
||||
self, dest: str, room_id: str, limit: int, extremities: StrCollection
|
||||
) -> None:
|
||||
"""Trigger a backfill request to `dest` for the given `room_id`
|
||||
|
||||
|
@ -1565,7 +1566,7 @@ class FederationEventHandler:
|
|||
@trace
|
||||
@tag_args
|
||||
async def _get_events_and_persist(
|
||||
self, destination: str, room_id: str, event_ids: Collection[str]
|
||||
self, destination: str, room_id: str, event_ids: StrCollection
|
||||
) -> None:
|
||||
"""Fetch the given events from a server, and persist them as outliers.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue