Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix typechecking errors introduced in #14128
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed Nov 15, 2022
1 parent b5ab2c4 commit 9a3e208
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion synapse/app/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def listen_http(
version_string: str,
max_request_body_size: int,
context_factory: IOpenSSLContextFactory,
reactor: IReactorSSL = reactor,
reactor: ISynapseReactor = reactor,
) -> List[Port]:
port = listener_config.port
bind_addresses = listener_config.bind_addresses
Expand Down
3 changes: 3 additions & 0 deletions synapse/app/generic_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ def _listen_http(self, listener_config: ListenerConfig) -> None:

root_resource = create_resource_tree(resources, OptionsResource())

# tls_server_context_factory is set by `refresh_certificate`, not in the
# homeserver constructor. Reassure mypy that we have set a context factory.
assert self.tls_server_context_factory is not None
_base.listen_http(
listener_config,
root_resource,
Expand Down
3 changes: 3 additions & 0 deletions synapse/app/homeserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ def _listener_http(
else:
root_resource = OptionsResource()

# tls_server_context_factory is set by `refresh_certificate`, not in the
# homeserver constructor. Reassure mypy that we have set a context factory.
assert self.tls_server_context_factory is not None
ports = listen_http(
listener_config,
create_resource_tree(resources, root_resource),
Expand Down

0 comments on commit 9a3e208

Please sign in to comment.