mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-08 05:44:59 -04:00
Fixup synapse.rest to pass mypy (#6732)
This commit is contained in:
parent
74b74462f1
commit
b0a66ab83c
12 changed files with 56 additions and 35 deletions
|
@ -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]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue