Skip to content

armgit / zulip

Public Imported from GitHub
0

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.py
index 919ab43e632..37678a79caa 100644
--- a/zerver/lib/home.py
+++ b/zerver/lib/home.py
@@ -1,7 +1,7 @@
import calendar
import time
from dataclasses import dataclass
-from typing import Any, Dict, List, Optional, Tuple
+from typing import Dict, List, Optional, Tuple
from django.conf import settings
from 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,