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

Convert state delta processing from a dict to attrs. #16469

Merged
merged 6 commits into from
Oct 16, 2023
Merged

Conversation

clokep
Copy link
Member

@clokep clokep commented Oct 11, 2023

Related to #16431, but also just gives better type hints.

@clokep clokep marked this pull request as ready for review October 11, 2023 19:47
@clokep clokep requested a review from a team as a code owner October 11, 2023 19:47
Copy link
Contributor

@DMRobertson DMRobertson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the docstring typo, LGTM!

synapse/storage/databases/main/state_deltas.py Outdated Show resolved Hide resolved
tests/handlers/test_typing.py Show resolved Hide resolved
Comment on lines +29 to +38
stream_id: int
room_id: str
event_type: str
state_key: str

event_id: Optional[str]
"""new event_id for this state key. None if the state has been deleted."""

prev_event_id: Optional[str]
"""previous event_id for this state key. None if it's new state."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I even double-checked that this matches the DB types :)

@clokep clokep merged commit e3e0ae4 into develop Oct 16, 2023
38 checks passed
@clokep clokep deleted the clokep/axe-dicts-2 branch October 16, 2023 11:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants