diff options
author | Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> | 2022-05-10 20:07:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-10 14:07:48 -0400 |
commit | 989fa3309655e2ebd5416f4b09a98edfb1b2caa8 (patch) | |
tree | a46cfb97b135957198f1cfa422a2cb4901a50c49 /synapse/events | |
parent | Stop writing to `event_reference_hashes` (#12679) (diff) | |
download | synapse-989fa3309655e2ebd5416f4b09a98edfb1b2caa8.tar.xz |
Add some type hints to datastore. (#12477)
Diffstat (limited to 'synapse/events')
-rw-r--r-- | synapse/events/snapshot.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/events/snapshot.py b/synapse/events/snapshot.py index 46042b2bf7..8120c305df 100644 --- a/synapse/events/snapshot.py +++ b/synapse/events/snapshot.py @@ -15,6 +15,7 @@ from typing import TYPE_CHECKING, List, Optional, Tuple, Union import attr from frozendict import frozendict +from typing_extensions import Literal from twisted.internet.defer import Deferred @@ -106,7 +107,7 @@ class EventContext: incomplete state. """ - rejected: Union[bool, str] = False + rejected: Union[Literal[False], str] = False _state_group: Optional[int] = None state_group_before_event: Optional[int] = None prev_group: Optional[int] = None |