diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-02-28 10:17:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-28 10:17:55 -0500 |
commit | c369d82df0eac691ccb549051dd61dd77b83d1e9 (patch) | |
tree | 9e49ef1cb67acf452cfc889db1ea4c78f33817d1 /synapse | |
parent | Do not accept pattern_type from user input in push rules. (#15088) (diff) | |
download | synapse-c369d82df0eac691ccb549051dd61dd77b83d1e9.tar.xz |
Add missing type hints to InsecureInterceptableContextFactory. (#15164)
Diffstat (limited to '')
-rw-r--r-- | synapse/http/client.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py index a05f297933..ae48e7c3f0 100644 --- a/synapse/http/client.py +++ b/synapse/http/client.py @@ -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 |