Skip to content

Commit

Permalink
chore(internal): fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertCraigie committed Jan 15, 2025
1 parent 69ad511 commit 483cc27
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/anthropic/_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
if origin == APIResponse:
raise RuntimeError("Unexpected state - cast_to is `APIResponse`")

if inspect.isclass(origin) and issubclass(origin, httpx.Response):
if inspect.isclass(
origin # pyright: ignore[reportUnknownArgumentType]
) and issubclass(origin, httpx.Response):
# Because of the invariance of our ResponseT TypeVar, users can subclass httpx.Response
# and pass that class to our request functions. We cannot change the variance to be either
# covariant or contravariant as that makes our usage of ResponseT illegal. We could construct
Expand Down

0 comments on commit 483cc27

Please sign in to comment.