diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-07-22 12:00:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-22 12:00:16 +0100 |
commit | d8324b8238a31b8d749b1dfe507c3bed3bcc6e17 (patch) | |
tree | 6783e1e477bac3bd9004d49e7417e44929eee2b3 /synapse/http/federation/matrix_federation_agent.py | |
parent | Move dev/ docs to development/ (#10453) (diff) | |
download | synapse-d8324b8238a31b8d749b1dfe507c3bed3bcc6e17.tar.xz |
Fix a handful of type annotations. (#10446)
* switch from `types.CoroutineType` to `typing.Coroutine` these should be identical semantically, and since `defer.ensureDeferred` is defined to take a `typing.Coroutine`, will keep mypy happy * Fix some annotations on inlineCallbacks functions * changelog
Diffstat (limited to 'synapse/http/federation/matrix_federation_agent.py')
-rw-r--r-- | synapse/http/federation/matrix_federation_agent.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/http/federation/matrix_federation_agent.py b/synapse/http/federation/matrix_federation_agent.py index 950770201a..c16b7f10e6 100644 --- a/synapse/http/federation/matrix_federation_agent.py +++ b/synapse/http/federation/matrix_federation_agent.py @@ -27,7 +27,7 @@ from twisted.internet.interfaces import ( ) from twisted.web.client import URI, Agent, HTTPConnectionPool from twisted.web.http_headers import Headers -from twisted.web.iweb import IAgent, IAgentEndpointFactory, IBodyProducer +from twisted.web.iweb import IAgent, IAgentEndpointFactory, IBodyProducer, IResponse from synapse.crypto.context_factory import FederationPolicyForHTTPS from synapse.http.client import BlacklistingAgentWrapper @@ -116,7 +116,7 @@ class MatrixFederationAgent: uri: bytes, headers: Optional[Headers] = None, bodyProducer: Optional[IBodyProducer] = None, - ) -> Generator[defer.Deferred, Any, defer.Deferred]: + ) -> Generator[defer.Deferred, Any, IResponse]: """ Args: method: HTTP method: GET/POST/etc |