Fix mypy lints
This commit is contained in:
parent
1263c7e2a9
commit
ee47878439
|
@ -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(
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue