summary refs log tree commit diff
path: root/synapse/appservice/api.py
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-05-06 13:35:20 +0100
committerGitHub <noreply@github.com>2022-05-06 12:35:20 +0000
commit2607b3e1816341b3b8534077bd5d3a4daf3a3d15 (patch)
tree65a060f414530b98f649bed759a50cfc165bbd22 /synapse/appservice/api.py
parentAdd the `notify_appservices_from_worker` configuration option (superseding `n... (diff)
downloadsynapse-2607b3e1816341b3b8534077bd5d3a4daf3a3d15.tar.xz
Update mypy to 0.950 and fix complaints (#12650)
Diffstat (limited to 'synapse/appservice/api.py')
-rw-r--r--synapse/appservice/api.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/appservice/api.py b/synapse/appservice/api.py
index adc6b074da..d19f8dd996 100644
--- a/synapse/appservice/api.py
+++ b/synapse/appservice/api.py
@@ -17,6 +17,7 @@ import urllib.parse
 from typing import TYPE_CHECKING, Dict, Iterable, List, Optional, Tuple
 
 from prometheus_client import Counter
+from typing_extensions import TypeGuard
 
 from synapse.api.constants import EventTypes, Membership, ThirdPartyEntityKind
 from synapse.api.errors import CodeMessageException
@@ -66,7 +67,7 @@ def _is_valid_3pe_metadata(info: JsonDict) -> bool:
     return True
 
 
-def _is_valid_3pe_result(r: JsonDict, field: str) -> bool:
+def _is_valid_3pe_result(r: object, field: str) -> TypeGuard[JsonDict]:
     if not isinstance(r, dict):
         return False