Skip to content

Commit 4a70e75

Browse files
shrey150claude
andcommitted
Fix pyright lint: cast dict to dict[str, Any] after isinstance check
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b3be24a commit 4a70e75

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/stagehand/session.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def _merge_default_model(params: dict[str, Any], default_model: dict[str, Any] |
129129

130130
options = params.get("options")
131131
if isinstance(options, dict):
132+
options = cast(dict[str, Any], options)
132133
if options.get("model") is not None:
133134
return params
134135
return {
@@ -156,6 +157,7 @@ def _merge_default_agent_model(params: dict[str, Any], default_model: dict[str,
156157

157158
agent_config = params.get("agent_config")
158159
if isinstance(agent_config, dict):
160+
agent_config = cast(dict[str, Any], agent_config)
159161
if agent_config.get("model") is not None:
160162
return params
161163
return {

0 commit comments

Comments
 (0)