Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 9ff81b3

Browse files
committed
lints
1 parent b1b3d99 commit 9ff81b3

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

synapse/handlers/message.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,6 @@ async def create_event(
721721
current_state_group=current_state_group,
722722
)
723723

724-
725724
# In an ideal world we wouldn't need the second part of this condition. However,
726725
# this behaviour isn't spec'd yet, meaning we should be able to deactivate this
727726
# behaviour. Another reason is that this code is also evaluated each time a new

synapse/storage/databases/state/store.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,12 +460,16 @@ def insert_deltas_group_txn(
460460
# The first prev_group will be the last persisted state group, which is passed in
461461
# else it will be the group most recently assigned
462462
if index > 0:
463-
context.prev_group_for_state_group_after_event = state_groups[index - 1]
463+
context.prev_group_for_state_group_after_event = state_groups[
464+
index - 1
465+
]
464466
context.state_group_before_event = state_groups[index - 1]
465467
else:
466468
context.prev_group_for_state_group_after_event = prev_group
467469
context.state_group_before_event = prev_group
468-
context.delta_ids_to_state_group_after_event = {(event.type, event.state_key): event.event_id}
470+
context.delta_ids_to_state_group_after_event = {
471+
(event.type, event.state_key): event.event_id
472+
}
469473
context.state_delta_due_to_event = {
470474
(event.type, event.state_key): event.event_id
471475
}
@@ -486,7 +490,10 @@ def insert_deltas_group_txn(
486490
table="state_group_edges",
487491
keys=("state_group", "prev_state_group"),
488492
values=[
489-
(context.state_group_after_event, context.prev_group_for_state_group_after_event)
493+
(
494+
context.state_group_after_event,
495+
context.prev_group_for_state_group_after_event,
496+
)
490497
for _, context in events_and_context
491498
],
492499
)
@@ -498,7 +505,13 @@ def insert_deltas_group_txn(
498505
table="state_groups_state",
499506
keys=("state_group", "room_id", "type", "state_key", "event_id"),
500507
values=[
501-
(context.state_group_after_event, room_id, key[0], key[1], state_id)
508+
(
509+
context.state_group_after_event,
510+
room_id,
511+
key[0],
512+
key[1],
513+
state_id,
514+
)
502515
for key, state_id in context.delta_ids_to_state_group_after_event.items()
503516
],
504517
)

0 commit comments

Comments
 (0)