mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 12:05:03 -04:00
Add a type hint for get_device_handler()
and fix incorrect types. (#14055)
This was the last untyped handler from the HomeServer object. Since it was being treated as Any (and thus unchecked) it was being used incorrectly in a few places.
This commit is contained in:
parent
9b4cb1e2ed
commit
6d47b7e325
16 changed files with 185 additions and 77 deletions
|
@ -510,7 +510,7 @@ class HomeServer(metaclass=abc.ABCMeta):
|
|||
)
|
||||
|
||||
@cache_in_self
|
||||
def get_device_handler(self):
|
||||
def get_device_handler(self) -> DeviceWorkerHandler:
|
||||
if self.config.worker.worker_app:
|
||||
return DeviceWorkerHandler(self)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue