diff options
author | Erik Johnston <erik@matrix.org> | 2020-09-03 15:38:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-03 15:38:32 +0100 |
commit | 208e1d3eb345dca12e25696e30cee7e788b65ae2 (patch) | |
tree | 1075ad1835ff5d9451c599643c16ecd62e8dc3ca /synapse/handlers/federation.py | |
parent | Remove useless changelog about reverting a #8239. (diff) | |
download | synapse-208e1d3eb345dca12e25696e30cee7e788b65ae2.tar.xz |
Fix typing for `@cached` wrapped functions (#8240)
This requires adding a mypy plugin to fiddle with the type signatures a bit.
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index bd8efbb768..310c7f7138 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -440,11 +440,11 @@ class FederationHandler(BaseHandler): if not prevs - seen: return - latest = await self.store.get_latest_event_ids_in_room(room_id) + latest_list = await self.store.get_latest_event_ids_in_room(room_id) # We add the prev events that we have seen to the latest # list to ensure the remote server doesn't give them to us - latest = set(latest) + latest = set(latest_list) latest |= seen logger.info( @@ -781,7 +781,7 @@ class FederationHandler(BaseHandler): # keys across all devices. current_keys = [ key - for device in cached_devices + for device in cached_devices.values() for key in device.get("keys", {}).get("keys", {}).values() ] @@ -2119,8 +2119,8 @@ class FederationHandler(BaseHandler): if backfilled or event.internal_metadata.is_outlier(): return - extrem_ids = await self.store.get_latest_event_ids_in_room(event.room_id) - extrem_ids = set(extrem_ids) + extrem_ids_list = await self.store.get_latest_event_ids_in_room(event.room_id) + extrem_ids = set(extrem_ids_list) prev_event_ids = set(event.prev_event_ids()) if extrem_ids == prev_event_ids: |