diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 7108013665..83121301f8 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -1565,7 +1565,7 @@ class EventCreationHandler:
if state_entry.state_group in self._external_cache_joined_hosts_updates:
return
- state = await state_entry.get_state(
+ await state_entry.get_state(
self._storage_controllers.state, StateFilter.all()
)
with opentracing.start_active_span("get_joined_hosts"):
diff --git a/synapse/storage/controllers/state.py b/synapse/storage/controllers/state.py
index bead56e753..191f9d0c71 100644
--- a/synapse/storage/controllers/state.py
+++ b/synapse/storage/controllers/state.py
@@ -19,7 +19,6 @@ from typing import (
Callable,
Collection,
Dict,
- FrozenSet,
Iterable,
List,
Mapping,
@@ -654,7 +653,7 @@ class StateStorageController:
if not changed_users:
return known_joined_hosts
- potentially_changed_hosts = set(get_domain_from_id(u) for u in changed_users)
+ potentially_changed_hosts = {get_domain_from_id(u) for u in changed_users}
if not potentially_changed_hosts - known_joined_hosts:
return known_joined_hosts
diff --git a/synapse/storage/databases/main/roommember.py b/synapse/storage/databases/main/roommember.py
index a01f7cbeb8..b252b49c43 100644
--- a/synapse/storage/databases/main/roommember.py
+++ b/synapse/storage/databases/main/roommember.py
@@ -57,7 +57,6 @@ from synapse.types import (
StrCollection,
get_domain_from_id,
)
-from synapse.types.state import StateFilter
from synapse.util.async_helpers import Linearizer
from synapse.util.caches import intern_string
from synapse.util.caches.descriptors import _CacheContext, cached, cachedList
|