diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 507912c5..cf1dd2b0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.42.0" + ".": "1.42.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 99c96c42..1d9aa3ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.42.1 (2025-12-08) + +Full Changelog: [v1.42.0...v1.42.1](https://github.com/Finch-API/finch-api-python/compare/v1.42.0...v1.42.1) + +### Bug Fixes + +* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([1a8a50a](https://github.com/Finch-API/finch-api-python/commit/1a8a50ab8b4a8398d00be2659827de0191067fbb)) + ## 1.42.0 (2025-12-02) Full Changelog: [v1.41.2...v1.42.0](https://github.com/Finch-API/finch-api-python/compare/v1.41.2...v1.42.0) diff --git a/pyproject.toml b/pyproject.toml index e8bc00b1..cba00405 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "finch-api" -version = "1.42.0" +version = "1.42.1" description = "The official Python library for the Finch API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/finch/_types.py b/src/finch/_types.py index b99b2f91..c0434ccd 100644 --- a/src/finch/_types.py +++ b/src/finch/_types.py @@ -245,6 +245,9 @@ class HttpxSendArgs(TypedDict, total=False): if TYPE_CHECKING: # This works because str.__contains__ does not accept object (either in typeshed or at runtime) # https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285 + # + # Note: index() and count() methods are intentionally omitted to allow pyright to properly + # infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr. class SequenceNotStr(Protocol[_T_co]): @overload def __getitem__(self, index: SupportsIndex, /) -> _T_co: ... @@ -253,8 +256,6 @@ def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ... def __contains__(self, value: object, /) -> bool: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_T_co]: ... - def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ... - def count(self, value: Any, /) -> int: ... def __reversed__(self) -> Iterator[_T_co]: ... else: # just point this to a normal `Sequence` at runtime to avoid having to special case diff --git a/src/finch/_version.py b/src/finch/_version.py index 1adaf11f..b5fafd31 100644 --- a/src/finch/_version.py +++ b/src/finch/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "finch" -__version__ = "1.42.0" # x-release-please-version +__version__ = "1.42.1" # x-release-please-version