check-schemas: Remove unnecessary special case for saved_snippets.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2025-01-02 12:33:08 -08:00
committed by Tim Abbott
parent c5feccaa34
commit 7ce49a709e
4 changed files with 10 additions and 15 deletions

View File

@@ -61,11 +61,6 @@ def get_event_checker(event: dict[str, Any]) -> Callable[[str, dict[str, Any]],
# Start by grabbing the event type.
name = event["type"]
# Work around the fact that we send a "saved_snippets" (plural)
# event type for an event that really just sends a single value.
if name == "saved_snippets":
name = "saved_snippet"
# Handle things like AttachmentRemoveEvent
if "op" in event:
name += "_" + event["op"].title()