mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-09 00:12:13 -04:00
Use a namedtuple rather than tuple unpacking
This commit is contained in:
parent
1fbb094c6f
commit
2ec5426035
2 changed files with 15 additions and 12 deletions
|
@ -25,7 +25,7 @@ from synapse.api.constants import EventTypes
|
|||
|
||||
from canonicaljson import encode_canonical_json
|
||||
from contextlib import contextmanager
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
import logging
|
||||
import math
|
||||
|
@ -1193,9 +1193,16 @@ class EventsStore(SQLBaseStore):
|
|||
new_backfill_events = []
|
||||
backward_ex_outliers = []
|
||||
|
||||
return (
|
||||
return AllNewEventsResult(
|
||||
new_forward_events, new_backfill_events,
|
||||
forward_ex_outliers, backward_ex_outliers,
|
||||
state_resets,
|
||||
)
|
||||
return self.runInteraction("get_all_new_events", get_all_new_events_txn)
|
||||
|
||||
|
||||
AllNewEventsResult = namedtuple("AllNewEventsResult", [
|
||||
"new_forward_events", "new_backfill_events",
|
||||
"forward_ex_outliers", "backward_ex_outliers",
|
||||
"state_resets"
|
||||
])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue