From 69f99d32d95b5256685d68874c73b2647cc8e900 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 06:55:53 +0000 Subject: [PATCH 1/2] chore(internal): codegen related update (#226) --- mypy.ini | 2 +- requirements-dev.lock | 4 ++-- src/onebusaway/_response.py | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mypy.ini b/mypy.ini index 4db4836..97658a5 100644 --- a/mypy.ini +++ b/mypy.ini @@ -41,7 +41,7 @@ cache_fine_grained = True # ``` # Changing this codegen to make mypy happy would increase complexity # and would not be worth it. -disable_error_code = func-returns-value +disable_error_code = func-returns-value,overload-cannot-match # https://github.com/python/mypy/issues/12162 [mypy.overrides] diff --git a/requirements-dev.lock b/requirements-dev.lock index 6c36e0f..146d5d8 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -49,7 +49,7 @@ markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py -mypy==1.13.0 +mypy==1.14.1 mypy-extensions==1.0.0 # via mypy nest-asyncio==1.6.0 @@ -69,7 +69,7 @@ pydantic-core==2.27.1 # via pydantic pygments==2.18.0 # via rich -pyright==1.1.390 +pyright==1.1.392.post0 pytest==8.3.3 # via pytest-asyncio pytest-asyncio==0.24.0 diff --git a/src/onebusaway/_response.py b/src/onebusaway/_response.py index 3cc5c5b..4aa5900 100644 --- a/src/onebusaway/_response.py +++ b/src/onebusaway/_response.py @@ -210,7 +210,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 onebusaway import BaseModel`" ) From fa160c99e9b2dd1de70cab5a892405cf3103776f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 06:56:13 +0000 Subject: [PATCH 2/2] release: 1.4.17 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/onebusaway/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1054662..644b63e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.4.16" + ".": "1.4.17" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a24f78..19953ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.4.17 (2025-01-17) + +Full Changelog: [v1.4.16...v1.4.17](https://github.com/OneBusAway/python-sdk/compare/v1.4.16...v1.4.17) + +### Chores + +* **internal:** codegen related update ([#226](https://github.com/OneBusAway/python-sdk/issues/226)) ([69f99d3](https://github.com/OneBusAway/python-sdk/commit/69f99d32d95b5256685d68874c73b2647cc8e900)) + ## 1.4.16 (2025-01-10) Full Changelog: [v1.4.15...v1.4.16](https://github.com/OneBusAway/python-sdk/compare/v1.4.15...v1.4.16) diff --git a/pyproject.toml b/pyproject.toml index c994aa1..07e4d89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "onebusaway" -version = "1.4.16" +version = "1.4.17" description = "The official Python library for the onebusaway-sdk API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/onebusaway/_version.py b/src/onebusaway/_version.py index 89bc4ad..b9440b3 100644 --- a/src/onebusaway/_version.py +++ b/src/onebusaway/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "onebusaway" -__version__ = "1.4.16" # x-release-please-version +__version__ = "1.4.17" # x-release-please-version