Mypy fixes for synapse.handlers.federation (#8422)

For some reason, an apparently unrelated PR upset mypy about this module. Here are a number of little fixes.
This commit is contained in:
Richard van der Hoff 2020-09-29 15:57:36 +01:00 committed by GitHub
parent 12f0d18611
commit 2649d545a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 11 deletions

View file

@ -24,10 +24,12 @@ from typing import (
Dict,
Iterable,
List,
Mapping,
Optional,
Sequence,
Tuple,
TypeVar,
Union,
)
from prometheus_client import Counter
@ -501,7 +503,7 @@ class FederationClient(FederationBase):
user_id: str,
membership: str,
content: dict,
params: Dict[str, str],
params: Optional[Mapping[str, Union[str, Iterable[str]]]],
) -> Tuple[str, EventBase, RoomVersion]:
"""
Creates an m.room.member event, with context, without participating in the room.