Add remaining type hints to synapse.events. (#11098)

This commit is contained in:
Patrick Cloke 2021-11-02 09:55:52 -04:00 committed by GitHub
parent 4535532526
commit c01bc5f43d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 184 additions and 109 deletions

View file

@ -55,7 +55,7 @@ class EventValidator:
]
for k in required:
if not hasattr(event, k):
if k not in event:
raise SynapseError(400, "Event does not have key %s" % (k,))
# Check that the following keys have string values