mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 19:44:51 -04:00
Use inline type hints in handlers/
and rest/
. (#10382)
This commit is contained in:
parent
36dc15412d
commit
98aec1cc9d
43 changed files with 212 additions and 215 deletions
|
@ -96,7 +96,7 @@ class ApplicationServicesHandler:
|
|||
self.current_max, limit
|
||||
)
|
||||
|
||||
events_by_room = {} # type: Dict[str, List[EventBase]]
|
||||
events_by_room: Dict[str, List[EventBase]] = {}
|
||||
for event in events:
|
||||
events_by_room.setdefault(event.room_id, []).append(event)
|
||||
|
||||
|
@ -275,7 +275,7 @@ class ApplicationServicesHandler:
|
|||
async def _handle_presence(
|
||||
self, service: ApplicationService, users: Collection[Union[str, UserID]]
|
||||
) -> List[JsonDict]:
|
||||
events = [] # type: List[JsonDict]
|
||||
events: List[JsonDict] = []
|
||||
presence_source = self.event_sources.sources["presence"]
|
||||
from_key = await self.store.get_type_stream_id_for_appservice(
|
||||
service, "presence"
|
||||
|
@ -375,7 +375,7 @@ class ApplicationServicesHandler:
|
|||
self, only_protocol: Optional[str] = None
|
||||
) -> Dict[str, JsonDict]:
|
||||
services = self.store.get_app_services()
|
||||
protocols = {} # type: Dict[str, List[JsonDict]]
|
||||
protocols: Dict[str, List[JsonDict]] = {}
|
||||
|
||||
# Collect up all the individual protocol responses out of the ASes
|
||||
for s in services:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue