Docstrings shouldn't lie.

This commit is contained in:
Jorik Schellekens 2019-08-05 14:44:19 +01:00
parent 6a355ca20a
commit bd0ed7b0c4

View file

@ -194,8 +194,8 @@ class DeviceWorkerStore(SQLBaseStore):
Args: Args:
destination (str): The host the device updates are intended for destination (str): The host the device updates are intended for
from_stream_id (int): The minimum stream_id to filter updates by, exclusive from_stream_id (int): The minimum stream_id to filter updates by, exclusive
query_map (Dict[(str, str): int]): Dictionary mapping query_map (Dict[(str, str): (int, str)]): Dictionary mapping
user_id/device_id to update stream_id user_id/device_id to update stream_id and the relevent opentracing context
Returns: Returns:
List[Dict]: List of objects representing an device update EDU List[Dict]: List of objects representing an device update EDU
@ -217,7 +217,7 @@ class DeviceWorkerStore(SQLBaseStore):
destination, user_id, from_stream_id destination, user_id, from_stream_id
) )
for device_id, device in iteritems(user_devices): for device_id, device in iteritems(user_devices):
stream_id = query_map[(user_id, device_id)][0] stream_id, _ = query_map[(user_id, device_id)]
result = { result = {
"user_id": user_id, "user_id": user_id,
"device_id": device_id, "device_id": device_id,