From 874438c5f4d99adaf25d8b8bd8d37b2bb7e6ea71 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 17 May 2022 16:29:36 +0100 Subject: [PATCH] Make use of the mypy plugin change as spotted here https://github.com/matrix-org/synapse/pull/12717#issuecomment-1128008804 --- synapse/storage/databases/main/roommember.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/synapse/storage/databases/main/roommember.py b/synapse/storage/databases/main/roommember.py index 608d40dfa164..cc528fcf2dae 100644 --- a/synapse/storage/databases/main/roommember.py +++ b/synapse/storage/databases/main/roommember.py @@ -15,6 +15,7 @@ import logging from typing import ( TYPE_CHECKING, + Callable, Collection, Dict, FrozenSet, @@ -634,7 +635,7 @@ def _get_users_server_still_shares_room_with_txn( ) async def get_rooms_for_user( - self, user_id: str, on_invalidate=None + self, user_id: str, on_invalidate: Optional[Callable[[], None]] = None ) -> FrozenSet[str]: """Returns a set of room_ids the user is currently joined to.