diff options
author | Jonathan de Jong <jonathan@automatia.nl> | 2021-07-16 19:22:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-16 18:22:36 +0100 |
commit | 98aec1cc9da2bd6b8e34ffb282c85abf9b8b42ca (patch) | |
tree | 82bb48929e2f63d543fba936cfb0f1f621ee3659 /synapse/handlers/appservice.py | |
parent | Add a module type for account validity (#9884) (diff) | |
download | synapse-98aec1cc9da2bd6b8e34ffb282c85abf9b8b42ca.tar.xz |
Use inline type hints in `handlers/` and `rest/`. (#10382)
Diffstat (limited to 'synapse/handlers/appservice.py')
-rw-r--r-- | synapse/handlers/appservice.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py index 862638cc4f..21a17cd2e8 100644 --- a/synapse/handlers/appservice.py +++ b/synapse/handlers/appservice.py @@ -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: |