Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 0326888

Browse files
authored
Remove some unused variables/parameters. (#12187)
1 parent 180d8ff commit 0326888

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

changelog.d/12187.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove unused variables.

synapse/storage/databases/main/roommember.py

+5-9
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
ProfileInfo,
4747
RoomsForUser,
4848
)
49-
from synapse.types import PersistedEventPosition, StateMap, get_domain_from_id
49+
from synapse.types import PersistedEventPosition, get_domain_from_id
5050
from synapse.util.async_helpers import Linearizer
5151
from synapse.util.caches import intern_string
5252
from synapse.util.caches.descriptors import _CacheContext, cached, cachedList
@@ -273,7 +273,7 @@ def _get_room_summary_txn(txn):
273273
txn.execute(sql, (room_id,))
274274
res = {}
275275
for count, membership in txn:
276-
summary = res.setdefault(membership, MemberSummary([], count))
276+
res.setdefault(membership, MemberSummary([], count))
277277

278278
# we order by membership and then fairly arbitrarily by event_id so
279279
# heroes are consistent
@@ -839,18 +839,14 @@ async def get_joined_hosts(self, room_id: str, state_entry):
839839

840840
with Measure(self._clock, "get_joined_hosts"):
841841
return await self._get_joined_hosts(
842-
room_id, state_group, state_entry.state, state_entry=state_entry
842+
room_id, state_group, state_entry=state_entry
843843
)
844844

845845
@cached(num_args=2, max_entries=10000, iterable=True)
846846
async def _get_joined_hosts(
847-
self,
848-
room_id: str,
849-
state_group: int,
850-
current_state_ids: StateMap[str],
851-
state_entry: "_StateCacheEntry",
847+
self, room_id: str, state_group: int, state_entry: "_StateCacheEntry"
852848
) -> FrozenSet[str]:
853-
# We don't use `state_group`, its there so that we can cache based on
849+
# We don't use `state_group`, it's there so that we can cache based on
854850
# it. However, its important that its never None, since two
855851
# current_state's with a state_group of None are likely to be different.
856852
#

0 commit comments

Comments
 (0)