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

Commit

Permalink
doc arg types for _seperate
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Jan 31, 2018
1 parent 7a0fbd9 commit 5d2e5d6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions synapse/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,21 @@ def _seperate(state_sets):
"""Takes the state_sets and figures out which keys are conflicted and
which aren't. i.e., which have multiple different event_ids associated
with them in different state sets.
Args:
state_sets(list[dict[(str, str), str]]):
List of dicts of (type, state_key) -> event_id, which are the
different state groups to resolve.
Returns:
(dict[(str, str), str], dict[(str, str), set[str]]):
A tuple of (unconflicted_state, conflicted_state), where:
unconflicted_state is a dict mapping (type, state_key)->event_id
for unconflicted state keys.
conflicted_state is a dict mapping (type, state_key) to a set of
event ids for conflicted state keys.
"""
unconflicted_state = dict(state_sets[0])
conflicted_state = {}
Expand Down

0 comments on commit 5d2e5d6

Please sign in to comment.