From 774478bdc8e2747b85370644f3f4d556e1f814aa Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
 <142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 17 Jan 2025 04:11:35 +0000
Subject: [PATCH] chore(internal): codegen related update

---
 mypy.ini                     | 2 +-
 requirements-dev.lock        | 4 ++--
 src/browserbase/_response.py | 8 +++++++-
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/mypy.ini b/mypy.ini
index 9e79a7c..811af71 100644
--- a/mypy.ini
+++ b/mypy.ini
@@ -41,7 +41,7 @@ cache_fine_grained = True
 # ```
 # Changing this codegen to make mypy happy would increase complexity
 # and would not be worth it.
-disable_error_code = func-returns-value
+disable_error_code = func-returns-value,overload-cannot-match
 
 # https://github.com/python/mypy/issues/12162
 [mypy.overrides]
diff --git a/requirements-dev.lock b/requirements-dev.lock
index a9c9df5..97fc565 100644
--- a/requirements-dev.lock
+++ b/requirements-dev.lock
@@ -48,7 +48,7 @@ markdown-it-py==3.0.0
     # via rich
 mdurl==0.1.2
     # via markdown-it-py
-mypy==1.13.0
+mypy==1.14.1
 mypy-extensions==1.0.0
     # via mypy
 nest-asyncio==1.6.0
@@ -68,7 +68,7 @@ pydantic-core==2.27.1
     # via pydantic
 pygments==2.18.0
     # via rich
-pyright==1.1.390
+pyright==1.1.392.post0
 pytest==8.3.3
     # via pytest-asyncio
 pytest-asyncio==0.24.0
diff --git a/src/browserbase/_response.py b/src/browserbase/_response.py
index 1876805..75c0fb9 100644
--- a/src/browserbase/_response.py
+++ b/src/browserbase/_response.py
@@ -210,7 +210,13 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
                 raise ValueError(f"Subclasses of httpx.Response cannot be passed to `cast_to`")
             return cast(R, response)
 
-        if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel):
+        if (
+            inspect.isclass(
+                origin  # pyright: ignore[reportUnknownArgumentType]
+            )
+            and not issubclass(origin, BaseModel)
+            and issubclass(origin, pydantic.BaseModel)
+        ):
             raise TypeError(
                 "Pydantic models must subclass our base model type, e.g. `from browserbase import BaseModel`"
             )