diff options
author | Erik Johnston <erik@matrix.org> | 2020-01-20 17:38:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-20 17:38:21 +0000 |
commit | b0a66ab83ce4d67e145a1129b1ebd8fc53c24408 (patch) | |
tree | e92fe5cc41128b369e096f2e34c7bae0e369803e /synapse/rest/key | |
parent | Fix `/events/:event_id` deprecated API. (#6731) (diff) | |
download | synapse-b0a66ab83ce4d67e145a1129b1ebd8fc53c24408.tar.xz |
Fixup synapse.rest to pass mypy (#6732)
Diffstat (limited to 'synapse/rest/key')
-rw-r--r-- | synapse/rest/key/v2/remote_key_resource.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/rest/key/v2/remote_key_resource.py b/synapse/rest/key/v2/remote_key_resource.py index e7fc3f0431..9d6813a047 100644 --- a/synapse/rest/key/v2/remote_key_resource.py +++ b/synapse/rest/key/v2/remote_key_resource.py @@ -13,6 +13,7 @@ # limitations under the License. import logging +from typing import Dict, Set from canonicaljson import encode_canonical_json, json from signedjson.sign import sign_json @@ -103,7 +104,7 @@ class RemoteKey(DirectServeResource): async def _async_render_GET(self, request): if len(request.postpath) == 1: (server,) = request.postpath - query = {server.decode("ascii"): {}} + query = {server.decode("ascii"): {}} # type: dict elif len(request.postpath) == 2: server, key_id = request.postpath minimum_valid_until_ts = parse_integer(request, "minimum_valid_until_ts") @@ -148,7 +149,7 @@ class RemoteKey(DirectServeResource): time_now_ms = self.clock.time_msec() - cache_misses = dict() + cache_misses = dict() # type: Dict[str, Set[str]] for (server_name, key_id, from_server), results in cached.items(): results = [(result["ts_added_ms"], result) for result in results] |