typing: Use accurate type hints for dictionaries.

This fixes the mypy errors related to dictionaries with django-stubs.
This commit is contained in:
PIG208
2021-08-03 23:44:55 +08:00
committed by Tim Abbott
parent 3b11c36ed9
commit 7386918539
3 changed files with 5 additions and 5 deletions

View File

@@ -302,7 +302,7 @@ def do_increment_logging_stat(
table = stat.data_collector.output_table
if table == RealmCount:
assert isinstance(zerver_object, Realm)
id_args = {"realm": zerver_object}
id_args: Dict[str, Union[Realm, UserProfile, Stream]] = {"realm": zerver_object}
elif table == UserCount:
assert isinstance(zerver_object, UserProfile)
id_args = {"realm": zerver_object.realm, "user": zerver_object}