summary refs log tree commit diff
path: root/synapse/types.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-04-23 12:21:23 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2021-04-23 12:22:28 +0100
commit476cc03d7a6984a37e446341b7f2c5df9e16b99d (patch)
treeab0eced5327d0ea3d821507b15c51ad0b97b3856 /synapse/types.py
parentMerge commit 'a27c1fd74' into anoa/dinsic_release_1_31_0 (diff)
parentAdd type hints to groups code. (#9393) (diff)
downloadsynapse-476cc03d7a6984a37e446341b7f2c5df9e16b99d.tar.xz
Merge commit 'd2f0ec12d' into anoa/dinsic_release_1_31_0
Diffstat (limited to 'synapse/types.py')
-rw-r--r--synapse/types.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/synapse/types.py b/synapse/types.py

index 9629b26b01..b629976853 100644 --- a/synapse/types.py +++ b/synapse/types.py
@@ -483,8 +483,7 @@ class RoomStreamToken: ) def __attrs_post_init__(self): - """Validates that both `topological` and `instance_map` aren't set. - """ + """Validates that both `topological` and `instance_map` aren't set.""" if self.instance_map and self.topological: raise ValueError( @@ -512,7 +511,11 @@ class RoomStreamToken: instance_name = await store.get_name_from_instance_id(instance_id) instance_map[instance_name] = pos - return cls(topological=None, stream=stream, instance_map=instance_map,) + return cls( + topological=None, + stream=stream, + instance_map=instance_map, + ) except Exception: pass raise SynapseError(400, "Invalid token %r" % (string,)) @@ -689,7 +692,7 @@ class PersistedEventPosition: persisted in the same room after this position will be after the returned `RoomStreamToken`. - Note: no guarentees are made about ordering w.r.t. events in other + Note: no guarantees are made about ordering w.r.t. events in other rooms. """ # Doing the naive thing satisfies the desired properties described in