diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index fe87cd91..26548fff 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.43.0"
+ ".": "0.43.1"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5030db89..f96c3f6b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,19 @@
# Changelog
+## 0.43.1 (2025-01-15)
+
+Full Changelog: [v0.43.0...v0.43.1](https://github.com/anthropics/anthropic-sdk-python/compare/v0.43.0...v0.43.1)
+
+### Bug Fixes
+
+* **docs:** correct results return type ([69ad511](https://github.com/anthropics/anthropic-sdk-python/commit/69ad5112596f6e9aaf5cd2d495cb57516f2afbd4))
+
+
+### Chores
+
+* **internal:** bump pyright dependency ([#822](https://github.com/anthropics/anthropic-sdk-python/issues/822)) ([f8ddb90](https://github.com/anthropics/anthropic-sdk-python/commit/f8ddb90112a432a750fd4123c747ca581cff54ab))
+* **internal:** fix lint ([483cc27](https://github.com/anthropics/anthropic-sdk-python/commit/483cc277b66cb5b1a767e9d91347f22bcf69dc28))
+
## 0.43.0 (2025-01-14)
Full Changelog: [v0.42.0...v0.43.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.42.0...v0.43.0)
diff --git a/api.md b/api.md
index 7f5698f1..44f97ac8 100644
--- a/api.md
+++ b/api.md
@@ -95,7 +95,7 @@ Methods:
- client.messages.batches.list(\*\*params) -> SyncPage[MessageBatch]
- client.messages.batches.delete(message_batch_id) -> DeletedMessageBatch
- client.messages.batches.cancel(message_batch_id) -> MessageBatch
-- client.messages.batches.results(message_batch_id) -> BinaryAPIResponse
+- client.messages.batches.results(message_batch_id) -> JSONLDecoder[MessageBatchIndividualResponse]
# Models
@@ -218,4 +218,4 @@ Methods:
- client.beta.messages.batches.list(\*\*params) -> SyncPage[BetaMessageBatch]
- client.beta.messages.batches.delete(message_batch_id) -> BetaDeletedMessageBatch
- client.beta.messages.batches.cancel(message_batch_id) -> BetaMessageBatch
-- client.beta.messages.batches.results(message_batch_id) -> BinaryAPIResponse
+- client.beta.messages.batches.results(message_batch_id) -> JSONLDecoder[MessageBatchIndividualResponse]
diff --git a/pyproject.toml b/pyproject.toml
index aca83dfb..8c212000 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "anthropic"
-version = "0.43.0"
+version = "0.43.1"
description = "The official Python library for the anthropic API"
dynamic = ["readme"]
license = "MIT"
diff --git a/requirements-dev.lock b/requirements-dev.lock
index e57c739f..2aba34ee 100644
--- a/requirements-dev.lock
+++ b/requirements-dev.lock
@@ -91,7 +91,7 @@ pydantic-core==2.27.1
# via pydantic
pygments==2.18.0
# via rich
-pyright==1.1.391
+pyright==1.1.392.post0
pytest==8.3.3
# via pytest-asyncio
pytest-asyncio==0.24.0
diff --git a/src/anthropic/_legacy_response.py b/src/anthropic/_legacy_response.py
index 98ce2972..dd1db8ef 100644
--- a/src/anthropic/_legacy_response.py
+++ b/src/anthropic/_legacy_response.py
@@ -294,7 +294,9 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
if origin == LegacyAPIResponse:
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
@@ -304,7 +306,13 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
raise ValueError(f"Subclasses of httpx.Response cannot be passed to `cast_to`")
return cast(R, response)
- if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel):
+ if (
+ inspect.isclass(
+ origin # pyright: ignore[reportUnknownArgumentType]
+ )
+ and not issubclass(origin, BaseModel)
+ and issubclass(origin, pydantic.BaseModel)
+ ):
raise TypeError("Pydantic models must subclass our base model type, e.g. `from anthropic import BaseModel`")
if (
diff --git a/src/anthropic/_response.py b/src/anthropic/_response.py
index 8734b1d5..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
@@ -236,7 +238,13 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
raise ValueError(f"Subclasses of httpx.Response cannot be passed to `cast_to`")
return cast(R, response)
- if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel):
+ if (
+ inspect.isclass(
+ origin # pyright: ignore[reportUnknownArgumentType]
+ )
+ and not issubclass(origin, BaseModel)
+ and issubclass(origin, pydantic.BaseModel)
+ ):
raise TypeError("Pydantic models must subclass our base model type, e.g. `from anthropic import BaseModel`")
if (
diff --git a/src/anthropic/_version.py b/src/anthropic/_version.py
index 6b3c4840..7b3b0075 100644
--- a/src/anthropic/_version.py
+++ b/src/anthropic/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "anthropic"
-__version__ = "0.43.0" # x-release-please-version
+__version__ = "0.43.1" # x-release-please-version