Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loosen expected type to AsyncClient #18

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/palace_tools/utils/http/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down