summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-01-19 17:33:22 +0000
committerRichard van der Hoff <richard@matrix.org>2018-02-01 12:41:34 +0000
commita18828c12961ce254660e7641335428ec0655868 (patch)
tree244411f634bf14d3f44c0fa38aa060581fa97150
parentMerge pull request #2831 from matrix-org/rav/fix-userdir-search-again (diff)
downloadsynapse-a18828c12961ce254660e7641335428ec0655868.tar.xz
Fix docstring for StateHandler.resolve_state_groups
The return type was a complete lie, so fix it
-rw-r--r--synapse/state.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/synapse/state.py b/synapse/state.py
index 1f9abf9d3d..2bc7e584c3 100644
--- a/synapse/state.py
+++ b/synapse/state.py
@@ -58,7 +58,11 @@ class _StateCacheEntry(object):
     __slots__ = ["state", "state_group", "state_id", "prev_group", "delta_ids"]
 
     def __init__(self, state, state_group, prev_group=None, delta_ids=None):
+        # dict[(str, str), str] map  from (type, state_key) to event_id
         self.state = frozendict(state)
+
+        # the ID of a state group if one and only one is involved.
+        # otherwise, None otherwise?
         self.state_group = state_group
 
         self.prev_group = prev_group
@@ -280,11 +284,12 @@ class StateHandler(object):
         """ Given a list of event_ids this method fetches the state at each
         event, resolves conflicts between them and returns them.
 
+        Args:
+            room_id (str):
+            event_ids (list[str]):
+
         Returns:
-            a Deferred tuple of (`state_group`, `state`, `prev_state`).
-            `state_group` is the name of a state group if one and only one is
-            involved. `state` is a map from (type, state_key) to event, and
-            `prev_state` is a list of event ids.
+            Deferred[_StateCacheEntry]: resolved state
         """
         logger.debug("resolve_state_groups event_ids %s", event_ids)