🚨 auto fix by pre-commit hooks

This commit is contained in:
pre-commit-ci[bot] 2025-06-01 16:56:09 +00:00 committed by molanp
parent 1ae0de87ce
commit 58a02c0555

View File

@ -37,12 +37,21 @@ def get_async_client(proxies=None, **kwargs):
try:
return httpx.AsyncClient(proxies=proxies, **kwargs)
except TypeError:
return httpx.AsyncClient(mounts={
k: v for k, v in {
"http://": httpx.AsyncHTTPTransport(proxy=proxies.get("http")) if proxies else None,
"https://": httpx.AsyncHTTPTransport(proxy=proxies.get("https")) if proxies else None
}.items() if v is not None
}, **kwargs)
return httpx.AsyncClient(
mounts={
k: v
for k, v in {
"http://": httpx.AsyncHTTPTransport(proxy=proxies.get("http"))
if proxies
else None,
"https://": httpx.AsyncHTTPTransport(proxy=proxies.get("https"))
if proxies
else None,
}.items()
if v is not None
},
**kwargs,
)
class AsyncHttpx: