diff options
author | David Robertson <davidr@element.io> | 2023-10-02 15:22:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-02 14:22:36 +0000 |
commit | 102677638002b3ef6ae956947333ddcde80680a7 (patch) | |
tree | 0f058bd5cd463040741246ef476cf56ca1a30259 /synapse/handlers | |
parent | Remove Python version from `/_synapse/admin/v1/server_version` (#16380) (diff) | |
download | synapse-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/handlers')
-rw-r--r-- | synapse/handlers/room_list.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/room_list.py b/synapse/handlers/room_list.py index bb0bdb8e6f..36e2db8975 100644 --- a/synapse/handlers/room_list.py +++ b/synapse/handlers/room_list.py @@ -33,7 +33,7 @@ from synapse.api.errors import ( RequestSendFailed, SynapseError, ) -from synapse.types import JsonDict, ThirdPartyInstanceID +from synapse.types import JsonDict, JsonMapping, ThirdPartyInstanceID from synapse.util.caches.descriptors import _CacheContext, cached from synapse.util.caches.response_cache import ResponseCache @@ -256,7 +256,7 @@ class RoomListHandler: cache_context: _CacheContext, with_alias: bool = True, allow_private: bool = False, - ) -> Optional[JsonDict]: + ) -> Optional[JsonMapping]: """Returns the entry for a room Args: |