event_queue: Fix a now-incorrect mypy annotation.

It's not clear tagging things like this as an Iterable is a good idea,
when it's in fact definitely a list.
This commit is contained in:
Tim Abbott
2017-10-05 23:11:16 -07:00
parent 930eef3caa
commit f11832536c

View File

@@ -906,7 +906,7 @@ def maybe_enqueue_notifications_for_message_update(user_profile_id,
def process_notification(notice):
# type: (Mapping[str, Any]) -> None
event = notice['event'] # type: Mapping[str, Any]
users = notice['users'] # type: Union[Iterable[int], Iterable[Mapping[str, Any]]]
users = notice['users'] # type: Union[List[int], List[Mapping[str, Any]]]
start_time = time.time()
if event['type'] == "message":
process_message_event(event, cast(Iterable[Mapping[str, Any]], users))