mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-09 02:32:14 -04:00
Use inline type hints in http/federation/
, storage/
and util/
(#10381)
This commit is contained in:
parent
3acf85c85f
commit
bdfde6dca1
38 changed files with 149 additions and 161 deletions
|
@ -960,9 +960,9 @@ class EventsBackgroundUpdatesStore(SQLBaseStore):
|
|||
event_to_types = {row[0]: (row[1], row[2]) for row in rows}
|
||||
|
||||
# Calculate the new last position we've processed up to.
|
||||
new_last_depth = rows[-1][3] if rows else last_depth # type: int
|
||||
new_last_stream = rows[-1][4] if rows else last_stream # type: int
|
||||
new_last_room_id = rows[-1][5] if rows else "" # type: str
|
||||
new_last_depth: int = rows[-1][3] if rows else last_depth
|
||||
new_last_stream: int = rows[-1][4] if rows else last_stream
|
||||
new_last_room_id: str = rows[-1][5] if rows else ""
|
||||
|
||||
# Map from room_id to last depth/stream_ordering processed for the room,
|
||||
# excluding the last room (which we're likely still processing). We also
|
||||
|
@ -989,7 +989,7 @@ class EventsBackgroundUpdatesStore(SQLBaseStore):
|
|||
retcols=("event_id", "auth_id"),
|
||||
)
|
||||
|
||||
event_to_auth_chain = {} # type: Dict[str, List[str]]
|
||||
event_to_auth_chain: Dict[str, List[str]] = {}
|
||||
for row in auth_events:
|
||||
event_to_auth_chain.setdefault(row["event_id"], []).append(row["auth_id"])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue