mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-05 12:44:27 -04:00
Add type hints for state. (#8140)
This commit is contained in:
parent
cbd8d83da7
commit
5758dcf30c
10 changed files with 420 additions and 203 deletions
|
@ -40,7 +40,7 @@ from synapse.metrics import LaterGauge
|
|||
from synapse.metrics.background_process_metrics import run_as_background_process
|
||||
from synapse.state import StateHandler
|
||||
from synapse.storage.databases.main import DataStore
|
||||
from synapse.types import JsonDict, UserID, get_domain_from_id
|
||||
from synapse.types import Collection, JsonDict, UserID, get_domain_from_id
|
||||
from synapse.util.async_helpers import Linearizer
|
||||
from synapse.util.caches.descriptors import cached
|
||||
from synapse.util.metrics import Measure
|
||||
|
@ -1318,7 +1318,7 @@ async def get_interested_parties(
|
|||
|
||||
async def get_interested_remotes(
|
||||
store: DataStore, states: List[UserPresenceState], state_handler: StateHandler
|
||||
) -> List[Tuple[List[str], List[UserPresenceState]]]:
|
||||
) -> List[Tuple[Collection[str], List[UserPresenceState]]]:
|
||||
"""Given a list of presence states figure out which remote servers
|
||||
should be sent which.
|
||||
|
||||
|
@ -1334,7 +1334,7 @@ async def get_interested_remotes(
|
|||
each tuple the list of UserPresenceState should be sent to each
|
||||
destination
|
||||
"""
|
||||
hosts_and_states = []
|
||||
hosts_and_states = [] # type: List[Tuple[Collection[str], List[UserPresenceState]]]
|
||||
|
||||
# First we look up the rooms each user is in (as well as any explicit
|
||||
# subscriptions), then for each distinct room we look up the remote
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue