summary refs log tree commit diff
path: root/synapse/storage/databases/main/relations.py
diff options
context:
space:
mode:
authorDirk Klimpel <5740567+dklimpel@users.noreply.github.com>2021-12-29 14:04:28 +0100
committerGitHub <noreply@github.com>2021-12-29 13:04:28 +0000
commitf82d38ed2e8e07c81a0d60f31401e3edecd5e57f (patch)
tree0dd17fb84983341a160d7ed6d189f52ef63006bb /synapse/storage/databases/main/relations.py
parentDo not attempt to bundled aggregations for /members and /state. (#11623) (diff)
downloadsynapse-f82d38ed2e8e07c81a0d60f31401e3edecd5e57f.tar.xz
Improve type hints in storage classes. (#11652)
By using cast and making ignores more specific.
Diffstat (limited to 'synapse/storage/databases/main/relations.py')
-rw-r--r--synapse/storage/databases/main/relations.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/relations.py b/synapse/storage/databases/main/relations.py

index 729ff17e2e..4ff6aed253 100644 --- a/synapse/storage/databases/main/relations.py +++ b/synapse/storage/databases/main/relations.py
@@ -13,7 +13,7 @@ # limitations under the License. import logging -from typing import List, Optional, Tuple, Union +from typing import List, Optional, Tuple, Union, cast import attr @@ -399,7 +399,7 @@ class RelationsWorkerStore(SQLBaseStore): AND relation_type = ? """ txn.execute(sql, (event_id, room_id, RelationTypes.THREAD)) - count = txn.fetchone()[0] # type: ignore[index] + count = cast(Tuple[int], txn.fetchone())[0] return count, latest_event_id