summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-02-11 07:20:16 -0500
committerGitHub <noreply@github.com>2022-02-11 07:20:16 -0500
commita121507cfec0ffce45a89f5a1019034eda5b0c70 (patch)
tree5a2f858ce5e86d2a572f4f023b76eba276308b90 /synapse/server.py
parentTests: replace mocked Authenticator with the real thing (#11913) (diff)
downloadsynapse-a121507cfec0ffce45a89f5a1019034eda5b0c70.tar.xz
Adds misc missing type hints (#11953)
Diffstat (limited to 'synapse/server.py')
-rw-r--r--synapse/server.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/server.py b/synapse/server.py
index 3032f0b738..564afdcb96 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -233,8 +233,8 @@ class HomeServer(metaclass=abc.ABCMeta):
         self,
         hostname: str,
         config: HomeServerConfig,
-        reactor=None,
-        version_string="Synapse",
+        reactor: Optional[ISynapseReactor] = None,
+        version_string: str = "Synapse",
     ):
         """
         Args:
@@ -244,7 +244,7 @@ class HomeServer(metaclass=abc.ABCMeta):
         if not reactor:
             from twisted.internet import reactor as _reactor
 
-            reactor = _reactor
+            reactor = cast(ISynapseReactor, _reactor)
 
         self._reactor = reactor
         self.hostname = hostname
@@ -264,7 +264,7 @@ class HomeServer(metaclass=abc.ABCMeta):
         self._module_web_resources: Dict[str, Resource] = {}
         self._module_web_resources_consumed = False
 
-    def register_module_web_resource(self, path: str, resource: Resource):
+    def register_module_web_resource(self, path: str, resource: Resource) -> None:
         """Allows a module to register a web resource to be served at the given path.
 
         If multiple modules register a resource for the same path, the module that