Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
home: Prevent mypy from inferring the type of page_params.
Zixuan James Lifa51d8718c7e
diff --git a/zerver/lib/home.py b/zerver/lib/home.pyindex 919ab43e632..37678a79caa 100644--- a/zerver/lib/home.py+++ b/zerver/lib/home.py@@ -1,7 +1,7 @@import calendarimport timefrom dataclasses import dataclass-from typing import Any, Dict, List, Optional, Tuple+from typing import Dict, List, Optional, Tuplefrom django.conf import settingsfrom django.http import HttpRequest@@ -125,7 +125,7 @@ def build_page_params_for_home_page_load(first_in_realm: bool,prompt_for_invites: bool,needs_tutorial: bool,-) -> Tuple[int, Dict[str, Any]]:+) -> Tuple[int, Dict[str, object]]:"""This function computes page_params for when we load the home page.@@ -179,7 +179,7 @@ def build_page_params_for_home_page_load(# Pass parameters to the client-side JavaScript code.# These end up in a JavaScript Object named 'page_params'.- page_params = dict(+ page_params: Dict[str, object] = dict(## Server settings.test_suite=settings.TEST_SUITE,insecure_desktop_app=insecure_desktop_app,