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:
Patrick Cloke 2023-01-26 12:31:58 -05:00 committed by GitHub
parent dc901a885f
commit ba79fb4a61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 43 additions and 58 deletions

View file

@ -17,7 +17,6 @@ from typing import (
TYPE_CHECKING,
AbstractSet,
Any,
Collection,
Dict,
FrozenSet,
List,
@ -62,6 +61,7 @@ from synapse.types import (
Requester,
RoomStreamToken,
StateMap,
StrCollection,
StreamKeyType,
StreamToken,
UserID,
@ -1179,7 +1179,7 @@ class SyncHandler:
async def _find_missing_partial_state_memberships(
self,
room_id: str,
members_to_fetch: Collection[str],
members_to_fetch: StrCollection,
events_with_membership_auth: Mapping[str, EventBase],
found_state_ids: StateMap[str],
) -> StateMap[str]: