diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-01-19 23:55:01 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-02-01 12:41:34 +0000 |
commit | 14737ba495d914daf350a80c9b34dfefb0ae5a86 (patch) | |
tree | 65c264d24b4739a2d072c27ec50d0f89f6aab7d3 | |
parent | More docstring fixes (diff) | |
download | synapse-14737ba495d914daf350a80c9b34dfefb0ae5a86.tar.xz |
doc arg types for _seperate
Diffstat (limited to '')
-rw-r--r-- | synapse/state.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/synapse/state.py b/synapse/state.py index 1071635ac4..30b16e201a 100644 --- a/synapse/state.py +++ b/synapse/state.py @@ -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 = {} |