Additional type hints for the proxy agent and SRV resolver modules. (#10608)

This commit is contained in:
Dirk Klimpel 2021-08-18 19:53:20 +02:00 committed by GitHub
parent 78a70a2e0b
commit 0c3565da4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 41 additions and 25 deletions

View file

@ -173,7 +173,7 @@ class ProxyAgent(_AgentBase):
raise ValueError(f"Invalid URI {uri!r}")
parsed_uri = URI.fromBytes(uri)
pool_key = (parsed_uri.scheme, parsed_uri.host, parsed_uri.port)
pool_key = f"{parsed_uri.scheme!r}{parsed_uri.host!r}{parsed_uri.port}"
request_path = parsed_uri.originForm
should_skip_proxy = False
@ -199,7 +199,7 @@ class ProxyAgent(_AgentBase):
)
# Cache *all* connections under the same key, since we are only
# connecting to a single destination, the proxy:
pool_key = ("http-proxy", self.http_proxy_endpoint)
pool_key = "http-proxy"
endpoint = self.http_proxy_endpoint
request_path = uri
elif (