Skip to content

Commit 79f8bc6

Browse files
authored
Merge pull request #17 from brand-dot-dev/release-please--branches--main--changes--next
release: 1.13.0
2 parents f5b532d + c88289b commit 79f8bc6

26 files changed

Lines changed: 630 additions & 240 deletions

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
permissions:
4343
contents: read
4444
id-token: write
45-
runs-on: depot-ubuntu-24.04
45+
runs-on: ${{ github.repository == 'stainless-sdks/brand.dev-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
4646
steps:
4747
- uses: actions/checkout@v4
4848

.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.12.1"
2+
".": "1.13.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 8
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-0758a435064bd016fe211989cb7f6a3441460664aead5870777f8a662aa69794.yml
3-
openapi_spec_hash: d646572eb126d1d18327240959fc96af
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-de37a4d4350c9cbde36a0e712baa6bf4f00c7ce9b70f5b24d18558740bbfa35b.yml
3+
openapi_spec_hash: 60eed6f8f984700475d589a871c73932
44
config_hash: a7a306a1c85eef178e7989e0ce5979c6

CHANGELOG.md

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

3+
## 1.13.0 (2025-09-07)
4+
5+
Full Changelog: [v1.12.1...v1.13.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.12.1...v1.13.0)
6+
7+
### Features
8+
9+
* **api:** api update ([87df1d4](https://github.com/brand-dot-dev/python-sdk/commit/87df1d46a0d754a0d3dc3cc68b4fd9d2cce93356))
10+
* improve future compat with pydantic v3 ([3cc4580](https://github.com/brand-dot-dev/python-sdk/commit/3cc4580e2035d82876574d3515d6f0e8b3194220))
11+
* **types:** replace List[str] with SequenceNotStr in params ([e4204bb](https://github.com/brand-dot-dev/python-sdk/commit/e4204bb3295a96c4eeea07e306a9866d1ee8e852))
12+
13+
14+
### Bug Fixes
15+
16+
* avoid newer type syntax ([4eda6ab](https://github.com/brand-dot-dev/python-sdk/commit/4eda6ab5d68888b9ae0a6f4c5333532603acbd06))
17+
18+
19+
### Chores
20+
21+
* **internal:** add Sequence related utils ([6e617e9](https://github.com/brand-dot-dev/python-sdk/commit/6e617e978bd81bed9d39aa5be446c0697d96a173))
22+
* **internal:** change ci workflow machines ([169d92b](https://github.com/brand-dot-dev/python-sdk/commit/169d92b7eda9c15d806accc91e89033d0e4e0dc2))
23+
* **internal:** codegen related update ([1fe969e](https://github.com/brand-dot-dev/python-sdk/commit/1fe969e85edcb0370dbd7f926c860115939e0aa9))
24+
* **internal:** move mypy configurations to `pyproject.toml` file ([62bff96](https://github.com/brand-dot-dev/python-sdk/commit/62bff96543fce02199301107ad8fea0f86883ebd))
25+
* **internal:** update pyright exclude list ([b0ec69a](https://github.com/brand-dot-dev/python-sdk/commit/b0ec69ae1a0caa28e00b37df2ad8e602ca127c35))
26+
327
## 1.12.1 (2025-08-22)
428

529
Full Changelog: [v1.12.0...v1.12.1](https://github.com/brand-dot-dev/python-sdk/compare/v1.12.0...v1.12.1)

mypy.ini

Lines changed: 0 additions & 50 deletions
This file was deleted.

pyproject.toml

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "brand.dev"
3-
version = "1.12.1"
3+
version = "1.13.0"
44
description = "The official Python library for the brand.dev API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -56,7 +56,6 @@ dev-dependencies = [
5656
"dirty-equals>=0.6.0",
5757
"importlib-metadata>=6.7.0",
5858
"rich>=13.7.1",
59-
"nest_asyncio==1.6.0",
6059
"pytest-xdist>=3.6.1",
6160
]
6261

@@ -148,6 +147,7 @@ exclude = [
148147
"_dev",
149148
".venv",
150149
".nox",
150+
".git",
151151
]
152152

153153
reportImplicitOverride = true
@@ -156,6 +156,58 @@ reportOverlappingOverload = false
156156
reportImportCycles = false
157157
reportPrivateUsage = false
158158

159+
[tool.mypy]
160+
pretty = true
161+
show_error_codes = true
162+
163+
# Exclude _files.py because mypy isn't smart enough to apply
164+
# the correct type narrowing and as this is an internal module
165+
# it's fine to just use Pyright.
166+
#
167+
# We also exclude our `tests` as mypy doesn't always infer
168+
# types correctly and Pyright will still catch any type errors.
169+
exclude = ['src/brand/dev/_files.py', '_dev/.*.py', 'tests/.*']
170+
171+
strict_equality = true
172+
implicit_reexport = true
173+
check_untyped_defs = true
174+
no_implicit_optional = true
175+
176+
warn_return_any = true
177+
warn_unreachable = true
178+
warn_unused_configs = true
179+
180+
# Turn these options off as it could cause conflicts
181+
# with the Pyright options.
182+
warn_unused_ignores = false
183+
warn_redundant_casts = false
184+
185+
disallow_any_generics = true
186+
disallow_untyped_defs = true
187+
disallow_untyped_calls = true
188+
disallow_subclassing_any = true
189+
disallow_incomplete_defs = true
190+
disallow_untyped_decorators = true
191+
cache_fine_grained = true
192+
193+
# By default, mypy reports an error if you assign a value to the result
194+
# of a function call that doesn't return anything. We do this in our test
195+
# cases:
196+
# ```
197+
# result = ...
198+
# assert result is None
199+
# ```
200+
# Changing this codegen to make mypy happy would increase complexity
201+
# and would not be worth it.
202+
disable_error_code = "func-returns-value,overload-cannot-match"
203+
204+
# https://github.com/python/mypy/issues/12162
205+
[[tool.mypy.overrides]]
206+
module = "black.files.*"
207+
ignore_errors = true
208+
ignore_missing_imports = true
209+
210+
159211
[tool.ruff]
160212
line-length = 120
161213
output-format = "grouped"

requirements-dev.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ multidict==6.4.4
7575
mypy==1.14.1
7676
mypy-extensions==1.0.0
7777
# via mypy
78-
nest-asyncio==1.6.0
7978
nodeenv==1.8.0
8079
# via pyright
8180
nox==2023.4.22

src/brand/dev/_base_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
ModelBuilderProtocol,
6060
)
6161
from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
62-
from ._compat import PYDANTIC_V2, model_copy, model_dump
62+
from ._compat import PYDANTIC_V1, model_copy, model_dump
6363
from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type
6464
from ._response import (
6565
APIResponse,
@@ -232,7 +232,7 @@ def _set_private_attributes(
232232
model: Type[_T],
233233
options: FinalRequestOptions,
234234
) -> None:
235-
if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None:
235+
if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None:
236236
self.__pydantic_private__ = {}
237237

238238
self._model = model
@@ -320,7 +320,7 @@ def _set_private_attributes(
320320
client: AsyncAPIClient,
321321
options: FinalRequestOptions,
322322
) -> None:
323-
if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None:
323+
if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None:
324324
self.__pydantic_private__ = {}
325325

326326
self._model = model

0 commit comments

Comments
 (0)