mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
Without an explicit type annotation, mypy infers the type of values in `page_params` upon its initialization as a `Union`, while other computed values haven't been assigned yet. We break this over-conservative inferred type by annotating `page_params` as a `Dict[str, object]`. We could have created a `TypedDict` to have accurate type annotation for all of the fields, but it does not seem worth it at this point since the data structure is not widely used in the backend. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
8.6 KiB
8.6 KiB