Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
event_schema: Use correct mypy type for EventModel.
Steve Howell9e14e6911258
diff --git a/zerver/lib/event_schema.py b/zerver/lib/event_schema.pyindex 3cb6d2ab2e0..a5df0311ccb 100644--- a/zerver/lib/event_schema.py+++ b/zerver/lib/event_schema.py@@ -6,7 +6,9 @@## See https://zulip.readthedocs.io/en/latest/subsystems/events-system.htmlfrom collections.abc import Callable-from typing import Any, cast+from typing import cast++from pydantic import BaseModelfrom zerver.lib.event_types import (AllowMessageEditingData,@@ -107,7 +109,7 @@ from zerver.lib.topic import ORIG_TOPIC, TOPIC_NAMEfrom zerver.lib.types import AnonymousSettingGroupDictfrom zerver.models import Realm, RealmUserDefault, Stream, UserProfile-EventModel = Any+EventModel = type[BaseModel]def validate_event_with_model_type(event: dict[str, object], model: EventModel) -> None: