diff --git a/synapse/http/additional_resource.py b/synapse/http/additional_resource.py index bf9069af5bc5..9a2684aca432 100644 --- a/synapse/http/additional_resource.py +++ b/synapse/http/additional_resource.py @@ -32,7 +32,7 @@ class AdditionalResource(DirectServeJsonResource): and exception handling. """ - def __init__(self, hs: "HomeServer", handler: Request): + def __init__(self, hs: "HomeServer", handler): """Initialise AdditionalResource The ``handler`` should return a deferred which completes when it has @@ -41,7 +41,7 @@ def __init__(self, hs: "HomeServer", handler: Request): Args: hs: homeserver - handler (twisted.internet.defer.Deferred): + handler ((twisted.web.server.Request) -> twisted.internet.defer.Deferred): function to be called to handle the request. """ super().__init__() diff --git a/synapse/http/federation/srv_resolver.py b/synapse/http/federation/srv_resolver.py index 6a9ce33d4ebf..eeb1a97dcdf0 100644 --- a/synapse/http/federation/srv_resolver.py +++ b/synapse/http/federation/srv_resolver.py @@ -28,7 +28,7 @@ logger = logging.getLogger(__name__) -SERVER_CACHE: Dict[bytes, List[Server]] = {} +SERVER_CACHE: Dict[bytes, List] = {} @attr.s(auto_attribs=True, slots=True, frozen=True)