mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
event checkers: Replace data_types.py with pydantic.
This commit completely eliminates the home-grown data_types.py system for checking types. Now, in our unit tests and schema checkers, we use pydantic types to check the shape of the event objects that are either in our JSON fixtures or that get captured by test_events.py. The code in event_types.py was completely code-generated from the legacy version of event_schema.py, so there shouldn't be any manual errors in how I ported the types over. (The code generation was non-trivial, though, as I had to account for changes from snake_case to CamelCase and deal with some other anomalies.)
This commit is contained in:
@@ -12,6 +12,8 @@ FILES_WITH_LEGACY_SUBJECT = {
|
||||
# This basically requires a big DB migration:
|
||||
"zerver/lib/topic.py",
|
||||
"zerver/lib/topic_sqlalchemy.py",
|
||||
# This is tied to legacy events.
|
||||
"zerver/lib/event_types.py",
|
||||
# This is for backward compatibility.
|
||||
"zerver/tests/test_legacy_subject.py",
|
||||
# Other migration-related changes require extreme care.
|
||||
|
Reference in New Issue
Block a user