From 89f9d526c8697b028baf5650f97fad82c6964d3c Mon Sep 17 00:00:00 2001 From: Jonathan Green Date: Thu, 7 Mar 2024 22:34:09 -0400 Subject: [PATCH] Loosen expected type (#18) --- src/palace_tools/utils/http/streaming.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/palace_tools/utils/http/streaming.py b/src/palace_tools/utils/http/streaming.py index 7dff584..a3dab50 100644 --- a/src/palace_tools/utils/http/streaming.py +++ b/src/palace_tools/utils/http/streaming.py @@ -2,7 +2,7 @@ from typing import Any, BinaryIO, ContextManager, TypeVar import rich.progress -from httpx import Response +from httpx import AsyncClient, Response from palace_tools.utils.http.async_client import HTTPXAsyncClient @@ -47,7 +47,7 @@ async def streaming_fetch( progress_updaters: Callable[[int], Any] | Sequence[Callable[[int], Any]] | None = None, - http_client: HTTPXAsyncClient | None = None, + http_client: AsyncClient | None = None, raise_for_status: bool = False, ) -> Response: async with HTTPXAsyncClient.with_existing_client(http_client) as client: @@ -80,7 +80,7 @@ async def streaming_fetch_with_progress( task_label: str | None = None, total_setters: Callable[[int], Any] | list[Callable[[int], Any]] | None = None, progress_updaters: Callable[[int], Any] | list[Callable[[int], Any]] | None = None, - http_client: HTTPXAsyncClient | None = None, + http_client: AsyncClient | None = None, raise_for_status: bool = False, ) -> Response: _progress_bar: ContextManager[rich.progress.Progress] | None = None