Skip to content

Commit 543442c

Browse files
chore(internal): codegen related update (#497)
1 parent cae7d51 commit 543442c

5 files changed

Lines changed: 65 additions & 59 deletions

File tree

mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ cache_fine_grained = True
4141
# ```
4242
# Changing this codegen to make mypy happy would increase complexity
4343
# and would not be worth it.
44-
disable_error_code = func-returns-value
44+
disable_error_code = func-returns-value,overload-cannot-match
4545

4646
# https://github.com/python/mypy/issues/12162
4747
[mypy.overrides]

requirements-dev.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ markdown-it-py==3.0.0
4949
# via rich
5050
mdurl==0.1.2
5151
# via markdown-it-py
52-
mypy==1.13.0
52+
mypy==1.14.1
5353
mypy-extensions==1.0.0
5454
# via mypy
5555
nest-asyncio==1.6.0
@@ -69,7 +69,7 @@ pydantic-core==2.27.1
6969
# via pydantic
7070
pygments==2.18.0
7171
# via rich
72-
pyright==1.1.390
72+
pyright==1.1.392.post0
7373
pytest==8.3.3
7474
# via pytest-asyncio
7575
pytest-asyncio==0.24.0

src/runloop_api_client/_response.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,13 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
210210
raise ValueError(f"Subclasses of httpx.Response cannot be passed to `cast_to`")
211211
return cast(R, response)
212212

213-
if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel):
213+
if (
214+
inspect.isclass(
215+
origin # pyright: ignore[reportUnknownArgumentType]
216+
)
217+
and not issubclass(origin, BaseModel)
218+
and issubclass(origin, pydantic.BaseModel)
219+
):
214220
raise TypeError(
215221
"Pydantic models must subclass our base model type, e.g. `from runloop_api_client import BaseModel`"
216222
)

src/runloop_api_client/types/devboxes/document_symbol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class DocumentSymbol(BaseModel):
3939
e.g the name of a function. Must be contained by the `range`.
4040
"""
4141

42-
children: Optional[List[DocumentSymbol]] = None
42+
children: Optional[List["DocumentSymbol"]] = None
4343
"""Children of this symbol, e.g. properties of a class."""
4444

4545
deprecated: Optional[bool] = None

0 commit comments

Comments
 (0)