From 35123af1fc3c9683e9fda42e172f8d38009cf66a Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Wed, 15 Jan 2025 16:44:32 +0000 Subject: [PATCH] chore(internal): fix lint --- src/anthropic/_response.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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