typing: Improve typing with assertions.

This fixes some mypy errors discovered with django-stubs.
This commit is contained in:
PIG208
2021-08-18 23:54:22 +08:00
committed by Tim Abbott
parent c16803625c
commit aa9d73c9f6
10 changed files with 21 additions and 6 deletions

View File

@@ -234,6 +234,7 @@ def build_page_params_for_home_page_load(
page_params["narrow_topic"] = narrow_topic
page_params["narrow"] = [dict(operator=term[0], operand=term[1]) for term in narrow]
page_params["max_message_id"] = max_message_id
assert isinstance(page_params["user_settings"], dict)
page_params["user_settings"]["enable_desktop_notifications"] = False
page_params["translation_data"] = get_language_translation_data(request_language)