Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Add some type hints to datastore. (#12477)
Browse files Browse the repository at this point in the history
  • Loading branch information
dklimpel authored May 10, 2022
1 parent 147f098 commit 989fa33
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 71 deletions.
1 change: 1 addition & 0 deletions changelog.d/12477.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add some type hints to datastore.
3 changes: 2 additions & 1 deletion synapse/events/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import attr
from frozendict import frozendict
from typing_extensions import Literal

from twisted.internet.defer import Deferred

Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 989fa33

Please sign in to comment.