Skip to content

Commit f648bbb

Browse files
chore(internal): codegen related update (#102)
1 parent 5be14e9 commit f648bbb

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

Diff for: mypy.ini

+1-1
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]

Diff for: requirements-dev.lock

+3-8
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ markdown-it-py==3.0.0
6363
# via rich
6464
mdurl==0.1.2
6565
# via markdown-it-py
66-
mypy==1.13.0
66+
mypy==1.14.1
6767
mypy-extensions==1.0.0
6868
# via mypy
6969
nest-asyncio==1.6.0
@@ -89,7 +89,7 @@ pyee==12.0.0
8989
# via playwright
9090
pygments==2.18.0
9191
# via rich
92-
pyright==1.1.390
92+
pyright==1.1.392.post0
9393
pysocks==1.7.1
9494
# via urllib3
9595
pytest==8.3.3
@@ -107,20 +107,15 @@ python-slugify==8.0.4
107107
# via pytest-playwright
108108
requests==2.32.3
109109
# via pytest-base-url
110+
respx==0.22.0
110111
rich==13.9.3
111112
ruff==0.7.1
112113
selenium==4.25.0
113-
pytz==2023.3.post1
114-
# via dirty-equals
115-
respx==0.22.0
116-
setuptools==68.2.2
117-
# via nodeenv
118114
six==1.16.0
119115
# via python-dateutil
120116
sniffio==1.3.1
121117
# via anyio
122118
# via browserbase
123-
# via httpx
124119
# via trio
125120
sortedcontainers==2.4.0
126121
# via trio

Diff for: src/browserbase/_response.py

+7-1
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 browserbase import BaseModel`"
216222
)

0 commit comments

Comments
 (0)