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

Add some type hints to datastore #12477

Merged
merged 10 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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