From 7e2d906a29e5173da0fcac4d7c08805a4026d169 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 18:45:36 +0000 Subject: [PATCH 1/2] fix(types): allow pyright to infer TypedDict types within SequenceNotStr --- src/increase/_types.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/increase/_types.py b/src/increase/_types.py index b81ab29db..d9b38629d 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -243,6 +243,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: ... @@ -251,8 +254,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 From c1451c399b34111d34708ac10d4541dda3abda46 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 18:46:05 +0000 Subject: [PATCH 2/2] release: 0.406.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/increase/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f86031a6a..323261fc3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.406.0" + ".": "0.406.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d54567fc5..51b0cd079 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.406.1 (2025-12-08) + +Full Changelog: [v0.406.0...v0.406.1](https://github.com/Increase/increase-python/compare/v0.406.0...v0.406.1) + +### Bug Fixes + +* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([7e2d906](https://github.com/Increase/increase-python/commit/7e2d906a29e5173da0fcac4d7c08805a4026d169)) + ## 0.406.0 (2025-12-06) Full Changelog: [v0.405.0...v0.406.0](https://github.com/Increase/increase-python/compare/v0.405.0...v0.406.0) diff --git a/pyproject.toml b/pyproject.toml index 77db21a8b..79fd56f26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.406.0" +version = "0.406.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9a3df12c7..40bafa3e3 100644 --- a/src/increase/_version.py +++ b/src/increase/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "increase" -__version__ = "0.406.0" # x-release-please-version +__version__ = "0.406.1" # x-release-please-version