diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-01-26 12:31:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-26 12:31:58 -0500 |
commit | ba79fb4a61784f4b5613da795a61f430af053ca6 (patch) | |
tree | d6759333a4aae6ae255c931d0bc87d87716abec7 /synapse/handlers/room.py | |
parent | Fix typo in release script (#14920) (diff) | |
download | synapse-ba79fb4a61784f4b5613da795a61f430af053ca6.tar.xz |
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].
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 572c7b4db3..60a6d9cf3c 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -20,16 +20,7 @@ import random import string from collections import OrderedDict from http import HTTPStatus -from typing import ( - TYPE_CHECKING, - Any, - Awaitable, - Collection, - Dict, - List, - Optional, - Tuple, -) +from typing import TYPE_CHECKING, Any, Awaitable, Dict, List, Optional, Tuple import attr from typing_extensions import TypedDict @@ -72,6 +63,7 @@ from synapse.types import ( RoomID, RoomStreamToken, StateMap, + StrCollection, StreamKeyType, StreamToken, UserID, @@ -1644,7 +1636,7 @@ class RoomEventSource(EventSource[RoomStreamToken, EventBase]): user: UserID, from_key: RoomStreamToken, limit: int, - room_ids: Collection[str], + room_ids: StrCollection, is_guest: bool, explicit_room_id: Optional[str] = None, ) -> Tuple[List[EventBase], RoomStreamToken]: |