summary refs log tree commit diff
path: root/synapse/storage/roommember.py
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2023-10-02 15:22:36 +0100
committerGitHub <noreply@github.com>2023-10-02 14:22:36 +0000
commit102677638002b3ef6ae956947333ddcde80680a7 (patch)
tree0f058bd5cd463040741246ef476cf56ca1a30259 /synapse/storage/roommember.py
parentRemove Python version from `/_synapse/admin/v1/server_version` (#16380) (diff)
downloadsynapse-102677638002b3ef6ae956947333ddcde80680a7.tar.xz
mypy plugin to check `@cached` return types (#14911)
Co-authored-by: David Robertson <davidr@element.io>
Co-authored-by: Patrick Cloke <patrickc@matrix.org>
Co-authored-by: Erik Johnston <erik@matrix.org>

Assert that the return type of callables wrapped in @cached
and @cachedList are cachable (aka immutable). 
Diffstat (limited to 'synapse/storage/roommember.py')
-rw-r--r--synapse/storage/roommember.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py
index 2500381b7b..cbfb32014c 100644
--- a/synapse/storage/roommember.py
+++ b/synapse/storage/roommember.py
@@ -45,6 +45,7 @@ class ProfileInfo:
     display_name: Optional[str]
 
 
+# TODO This is used as a cached value and is mutable.
 @attr.s(slots=True, frozen=True, weakref_slot=False, auto_attribs=True)
 class MemberSummary:
     # A truncated list of (user_id, event_id) tuples for users of a given