fix(types): T5 — narrow AsyncClient|None with inline if; rename loop variable t→task to avoid no-redef
This commit is contained in:
@@ -148,7 +148,7 @@ async def deliver(
|
||||
url = sub["url"]
|
||||
|
||||
owns_client = client is None
|
||||
if owns_client:
|
||||
if client is None:
|
||||
client = httpx.AsyncClient(timeout=timeout_s)
|
||||
|
||||
last_status: Optional[int] = None
|
||||
|
||||
@@ -85,7 +85,7 @@ async def webhook_worker(
|
||||
|
||||
shutdown = asyncio.Event()
|
||||
owns_http = http_client is None
|
||||
if owns_http:
|
||||
if http_client is None:
|
||||
http_client = httpx.AsyncClient(timeout=10.0)
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user