mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-31 23:14:24 -04:00
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
This commit is contained in:
parent
d518b05a86
commit
d8324b8238
4 changed files with 6 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue