Fix up types and comments that refer to Deferreds. (#7945)

This commit is contained in:
Patrick Cloke 2020-07-24 10:53:25 -04:00 committed by GitHub
parent 53f7b49f5b
commit e739b20588
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 174 additions and 157 deletions

View file

@ -15,6 +15,7 @@
import itertools
import logging
from typing import Iterable
from unpaddedbase64 import decode_base64, encode_base64
@ -37,7 +38,7 @@ class SearchHandler(BaseHandler):
self.state_store = self.storage.state
self.auth = hs.get_auth()
async def get_old_rooms_from_upgraded_room(self, room_id):
async def get_old_rooms_from_upgraded_room(self, room_id: str) -> Iterable[str]:
"""Retrieves room IDs of old rooms in the history of an upgraded room.
We do so by checking the m.room.create event of the room for a
@ -48,10 +49,10 @@ class SearchHandler(BaseHandler):
The full list of all found rooms in then returned.
Args:
room_id (str): id of the room to search through.
room_id: id of the room to search through.
Returns:
Deferred[iterable[str]]: predecessor room ids
Predecessor room ids
"""
historical_room_ids = []