diff --git a/src/anthropic/_response.py b/src/anthropic/_response.py index 32104410..830bee51 100644 --- a/src/anthropic/_response.py +++ b/src/anthropic/_response.py @@ -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