-
Notifications
You must be signed in to change notification settings - Fork 1
release: 0.11.1 #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
stainless-app
merged 6 commits into
main
from
release-please--branches--main--changes--next
Sep 9, 2025
Merged
release: 0.11.1 #40
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4818d2d
chore(internal): move mypy configurations to `pyproject.toml` file
stainless-app[bot] e5838f5
feat(api): add pagination to the deployments endpoint
stainless-app[bot] f64f55b
feat(api): update API spec with pagination headers
stainless-app[bot] 5f2329f
feat(api): pagination properties added to response (has_more, next_of…
stainless-app[bot] cd90a49
chore(tests): simplify `get_platform` test
stainless-app[bot] 0287597
release: 0.11.1
stainless-app[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| { | ||
| ".": "0.11.0" | ||
| ".": "0.11.1" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| configured_endpoints: 46 | ||
| openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-e98d46c55826cdf541a9ee0df04ce92806ac6d4d92957ae79f897270b7d85b23.yml | ||
| openapi_spec_hash: 8a1af54fc0a4417165b8a52e6354b685 | ||
| config_hash: 043ddc54629c6d8b889123770cb4769f | ||
| openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-cb38560915edce03abce2ae3ef5bc745489dbe9b6f80c2b4ff42edf8c2ff276d.yml | ||
| openapi_spec_hash: a869194d6c864ba28d79ec0105439c3e | ||
| config_hash: ed56f95781ec9b2e73c97e1a66606071 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
|
||
| __title__ = "kernel" | ||
| __version__ = "0.11.0" # x-release-please-version | ||
| __version__ = "0.11.1" # x-release-please-version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
|
||
| from typing import Any, List, Type, Generic, Mapping, TypeVar, Optional, cast | ||
| from typing_extensions import override | ||
|
|
||
| from httpx import Response | ||
|
|
||
| from ._utils import is_mapping, maybe_coerce_boolean, maybe_coerce_integer | ||
| from ._models import BaseModel | ||
| from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage | ||
|
|
||
| __all__ = ["SyncOffsetPagination", "AsyncOffsetPagination"] | ||
|
|
||
| _BaseModelT = TypeVar("_BaseModelT", bound=BaseModel) | ||
|
|
||
| _T = TypeVar("_T") | ||
|
|
||
|
|
||
| class SyncOffsetPagination(BaseSyncPage[_T], BasePage[_T], Generic[_T]): | ||
| items: List[_T] | ||
| has_more: Optional[bool] = None | ||
| next_offset: Optional[int] = None | ||
|
|
||
| @override | ||
| def _get_page_items(self) -> List[_T]: | ||
| items = self.items | ||
| if not items: | ||
| return [] | ||
| return items | ||
|
|
||
| @override | ||
| def has_next_page(self) -> bool: | ||
| has_more = self.has_more | ||
| if has_more is not None and has_more is False: | ||
| return False | ||
|
|
||
| return super().has_next_page() | ||
|
|
||
| @override | ||
| def next_page_info(self) -> Optional[PageInfo]: | ||
| next_offset = self.next_offset | ||
| if next_offset is None: | ||
| return None # type: ignore[unreachable] | ||
|
|
||
| length = len(self._get_page_items()) | ||
| current_count = next_offset + length | ||
|
|
||
| return PageInfo(params={"offset": current_count}) | ||
|
|
||
| @classmethod | ||
| def build(cls: Type[_BaseModelT], *, response: Response, data: object) -> _BaseModelT: # noqa: ARG003 | ||
| return cls.construct( | ||
| None, | ||
| **{ | ||
| **(cast(Mapping[str, Any], data) if is_mapping(data) else {"items": data}), | ||
| "has_more": maybe_coerce_boolean(response.headers.get("X-Has-More")), | ||
| "next_offset": maybe_coerce_integer(response.headers.get("X-Next-Offset")), | ||
| }, | ||
| ) | ||
|
|
||
|
|
||
| class AsyncOffsetPagination(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): | ||
| items: List[_T] | ||
| has_more: Optional[bool] = None | ||
| next_offset: Optional[int] = None | ||
|
|
||
| @override | ||
| def _get_page_items(self) -> List[_T]: | ||
| items = self.items | ||
| if not items: | ||
| return [] | ||
| return items | ||
|
|
||
| @override | ||
| def has_next_page(self) -> bool: | ||
| has_more = self.has_more | ||
| if has_more is not None and has_more is False: | ||
| return False | ||
|
|
||
| return super().has_next_page() | ||
|
|
||
| @override | ||
| def next_page_info(self) -> Optional[PageInfo]: | ||
| next_offset = self.next_offset | ||
| if next_offset is None: | ||
| return None # type: ignore[unreachable] | ||
|
|
||
| length = len(self._get_page_items()) | ||
| current_count = next_offset + length | ||
|
|
||
| return PageInfo(params={"offset": current_count}) | ||
|
|
||
| @classmethod | ||
| def build(cls: Type[_BaseModelT], *, response: Response, data: object) -> _BaseModelT: # noqa: ARG003 | ||
| return cls.construct( | ||
| None, | ||
| **{ | ||
| **(cast(Mapping[str, Any], data) if is_mapping(data) else {"items": data}), | ||
| "has_more": maybe_coerce_boolean(response.headers.get("X-Has-More")), | ||
| "next_offset": maybe_coerce_integer(response.headers.get("X-Next-Offset")), | ||
| }, | ||
| ) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exclude pattern format has changed from regex format (
^(src/kernel/_files\.py|_dev/.*\.py|tests/.*)$) to a simpler glob-like format (['src/kernel/_files.py', '_dev/.*.py', 'tests/.*']). While this may work, you should verify that mypy correctly interprets this new format, especially for the wildcard patterns like_dev/.*.pyandtests/.*. The original regex format was more explicit about matching paths.