Fix (final) Bugbear violations (#9838)

This commit is contained in:
Jonathan de Jong 2021-04-20 12:50:49 +02:00 committed by GitHub
parent 71f0623de9
commit 495b214f4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 46 additions and 49 deletions

View file

@ -144,7 +144,7 @@ class RemoteKey(DirectServeJsonResource):
# Note that the value is unused.
cache_misses = {} # type: Dict[str, Dict[str, int]]
for (server_name, key_id, from_server), results in cached.items():
for (server_name, key_id, _), results in cached.items():
results = [(result["ts_added_ms"], result) for result in results]
if not results and key_id is not None:
@ -206,7 +206,7 @@ class RemoteKey(DirectServeJsonResource):
# Cast to bytes since postgresql returns a memoryview.
json_results.add(bytes(most_recent_result["key_json"]))
else:
for ts_added, result in results:
for _, result in results:
# Cast to bytes since postgresql returns a memoryview.
json_results.add(bytes(result["key_json"]))