🚨 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: try:
return httpx.AsyncClient(proxies=proxies, **kwargs) return httpx.AsyncClient(proxies=proxies, **kwargs)
except TypeError: except TypeError:
return httpx.AsyncClient(mounts={ return httpx.AsyncClient(
k: v for k, v in { mounts={
"http://": httpx.AsyncHTTPTransport(proxy=proxies.get("http")) if proxies else None, k: v
"https://": httpx.AsyncHTTPTransport(proxy=proxies.get("https")) if proxies else None for k, v in {
}.items() if v is not None "http://": httpx.AsyncHTTPTransport(proxy=proxies.get("http"))
}, **kwargs) if proxies
else None,
"https://": httpx.AsyncHTTPTransport(proxy=proxies.get("https"))
if proxies
else None,
}.items()
if v is not None
},
**kwargs,
)
class AsyncHttpx: class AsyncHttpx: