Skip to content

Commit c7b0dbe

Browse files
release: 1.42.1 (#685)
* fix(types): allow pyright to infer TypedDict types within SequenceNotStr * release: 1.42.1 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 446470e commit c7b0dbe

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.42.0"
2+
".": "1.42.1"
33
}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 1.42.1 (2025-12-08)
4+
5+
Full Changelog: [v1.42.0...v1.42.1](https://github.com/Finch-API/finch-api-python/compare/v1.42.0...v1.42.1)
6+
7+
### Bug Fixes
8+
9+
* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([1a8a50a](https://github.com/Finch-API/finch-api-python/commit/1a8a50ab8b4a8398d00be2659827de0191067fbb))
10+
311
## 1.42.0 (2025-12-02)
412

513
Full Changelog: [v1.41.2...v1.42.0](https://github.com/Finch-API/finch-api-python/compare/v1.41.2...v1.42.0)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "finch-api"
3-
version = "1.42.0"
3+
version = "1.42.1"
44
description = "The official Python library for the Finch API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/finch/_types.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ class HttpxSendArgs(TypedDict, total=False):
245245
if TYPE_CHECKING:
246246
# This works because str.__contains__ does not accept object (either in typeshed or at runtime)
247247
# https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285
248+
#
249+
# Note: index() and count() methods are intentionally omitted to allow pyright to properly
250+
# infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr.
248251
class SequenceNotStr(Protocol[_T_co]):
249252
@overload
250253
def __getitem__(self, index: SupportsIndex, /) -> _T_co: ...
@@ -253,8 +256,6 @@ def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ...
253256
def __contains__(self, value: object, /) -> bool: ...
254257
def __len__(self) -> int: ...
255258
def __iter__(self) -> Iterator[_T_co]: ...
256-
def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ...
257-
def count(self, value: Any, /) -> int: ...
258259
def __reversed__(self) -> Iterator[_T_co]: ...
259260
else:
260261
# just point this to a normal `Sequence` at runtime to avoid having to special case

src/finch/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "finch"
4-
__version__ = "1.42.0" # x-release-please-version
4+
__version__ = "1.42.1" # x-release-please-version

0 commit comments

Comments
 (0)