From ceb8e94522516242dc400c281133c053ddcc7961 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 18:40:49 +0000 Subject: [PATCH 1/2] chore(internal): add type construction helper (#27) --- src/onebusaway/_models.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/onebusaway/_models.py b/src/onebusaway/_models.py index eb7ce3b..5148d5a 100644 --- a/src/onebusaway/_models.py +++ b/src/onebusaway/_models.py @@ -406,6 +406,15 @@ def build( return cast(_BaseModelT, construct_type(type_=base_model_cls, value=kwargs)) +def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T: + """Loose coercion to the expected type with construction of nested values. + + Note: the returned value from this function is not guaranteed to match the + given type. + """ + return cast(_T, construct_type(value=value, type_=type_)) + + def construct_type(*, value: object, type_: object) -> object: """Loose coercion to the expected type with construction of nested values. From 6277b63ad0138d2a22ec58250cf6d0dca9f1b227 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 18:41:02 +0000 Subject: [PATCH 2/2] release: 0.1.0-alpha.7 --- .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 4f9005e..b5db7ce 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.6" + ".": "0.1.0-alpha.7" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index facf44e..fdbe776 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.7 (2024-07-29) + +Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/OneBusAway/python-sdk/compare/v0.1.0-alpha.6...v0.1.0-alpha.7) + +### Chores + +* **internal:** add type construction helper ([#27](https://github.com/OneBusAway/python-sdk/issues/27)) ([ceb8e94](https://github.com/OneBusAway/python-sdk/commit/ceb8e94522516242dc400c281133c053ddcc7961)) + ## 0.1.0-alpha.6 (2024-07-29) Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/OneBusAway/python-sdk/compare/v0.1.0-alpha.5...v0.1.0-alpha.6) diff --git a/pyproject.toml b/pyproject.toml index 499eff2..63a507b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "onebusaway" -version = "0.1.0-alpha.6" +version = "0.1.0-alpha.7" 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 2738c65..faf8c10 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__ = "0.1.0-alpha.6" # x-release-please-version +__version__ = "0.1.0-alpha.7" # x-release-please-version