diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-02-11 07:20:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-11 07:20:16 -0500 |
commit | a121507cfec0ffce45a89f5a1019034eda5b0c70 (patch) | |
tree | 5a2f858ce5e86d2a572f4f023b76eba276308b90 /synapse/server.py | |
parent | Tests: replace mocked Authenticator with the real thing (#11913) (diff) | |
download | synapse-a121507cfec0ffce45a89f5a1019034eda5b0c70.tar.xz |
Adds misc missing type hints (#11953)
Diffstat (limited to 'synapse/server.py')
-rw-r--r-- | synapse/server.py | 8 |
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 |