Fix mypy lints

This commit is contained in:
Eric Eastwood 2021-10-21 04:49:28 -05:00
parent 1263c7e2a9
commit ee47878439
2 changed files with 4 additions and 2 deletions

View file

@ -146,7 +146,7 @@ class FederationHandler:
await self.store.get_oldest_event_ids_with_depth_in_room(room_id)
)
insertion_events_to_be_backfilled = []
insertion_events_to_be_backfilled: Dict[str, int] = {}
if self.hs.config.experimental.msc2716_enabled:
insertion_events_to_be_backfilled = (
await self.store.get_insertion_event_backwards_extremities_in_room(

View file

@ -957,7 +957,9 @@ class EventCreationHandler:
assert (
builder.type == EventTypes.Create
or len(prev_event_ids) > 0
or len(auth_event_ids) > 0
# Allow an event to have empty list of prev_event_ids
# only if it has auth_event_ids.
or (auth_event_ids and len(auth_event_ids) > 0)
), "Attempting to create an event with no prev_events or auth_event_ids"
event = await builder.build(