Skip to content
Snippets Groups Projects
Unverified Commit c369d82d authored by Patrick Cloke's avatar Patrick Cloke Committed by GitHub
Browse files

Add missing type hints to InsecureInterceptableContextFactory. (#15164)

parent e746f80b
No related branches found
No related tags found
No related merge requests found
Improve type hints.
......@@ -36,9 +36,6 @@ exclude = (?x)
[mypy-synapse.federation.transport.client]
disallow_untyped_defs = False
[mypy-synapse.http.client]
disallow_untyped_defs = False
[mypy-synapse.http.matrixfederationclient]
disallow_untyped_defs = False
......
......@@ -44,6 +44,7 @@ from twisted.internet.interfaces import (
IAddress,
IDelayedCall,
IHostResolution,
IOpenSSLContextFactory,
IReactorCore,
IReactorPluggableNameResolver,
IReactorTime,
......@@ -958,8 +959,8 @@ class InsecureInterceptableContextFactory(ssl.ContextFactory):
self._context = SSL.Context(SSL.SSLv23_METHOD)
self._context.set_verify(VERIFY_NONE, lambda *_: False)
def getContext(self, hostname=None, port=None):
def getContext(self) -> SSL.Context:
return self._context
def creatorForNetloc(self, hostname: bytes, port: int):
def creatorForNetloc(self, hostname: bytes, port: int) -> IOpenSSLContextFactory:
return self
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment