mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-08 19:22:16 -04:00
Change collection[str] to StrCollection in event_auth code (#14929)
Signed-off-by: Harishankar Kumar <hari01584@gmail.com>
This commit is contained in:
parent
c0bf4c3cb4
commit
db2b105d69
5 changed files with 19 additions and 24 deletions
|
@ -16,18 +16,7 @@
|
|||
import collections.abc
|
||||
import logging
|
||||
import typing
|
||||
from typing import (
|
||||
Any,
|
||||
Collection,
|
||||
Dict,
|
||||
Iterable,
|
||||
List,
|
||||
Mapping,
|
||||
Optional,
|
||||
Set,
|
||||
Tuple,
|
||||
Union,
|
||||
)
|
||||
from typing import Any, Dict, Iterable, List, Mapping, Optional, Set, Tuple, Union
|
||||
|
||||
from canonicaljson import encode_canonical_json
|
||||
from signedjson.key import decode_verify_key_bytes
|
||||
|
@ -56,7 +45,13 @@ from synapse.api.room_versions import (
|
|||
RoomVersions,
|
||||
)
|
||||
from synapse.storage.databases.main.events_worker import EventRedactBehaviour
|
||||
from synapse.types import MutableStateMap, StateMap, UserID, get_domain_from_id
|
||||
from synapse.types import (
|
||||
MutableStateMap,
|
||||
StateMap,
|
||||
StrCollection,
|
||||
UserID,
|
||||
get_domain_from_id,
|
||||
)
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
# conditional imports to avoid import cycle
|
||||
|
@ -69,7 +64,7 @@ logger = logging.getLogger(__name__)
|
|||
class _EventSourceStore(Protocol):
|
||||
async def get_events(
|
||||
self,
|
||||
event_ids: Collection[str],
|
||||
event_ids: StrCollection,
|
||||
redact_behaviour: EventRedactBehaviour,
|
||||
get_prev_content: bool = False,
|
||||
allow_rejected: bool = False,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue