stagehand-python@4.2.0a0.dev1526: Claimed 2987 Improve Python SDK type checking with ty ( 2992)
Stagehand Python release 4.2.0a0.dev1526 upgrades and pins ty to 0.0.82, bringing generated SDK models under type checking and fixing typing diagnostics across Chrome process handling and defaults.
原始内容为英文;当前页面提供中文导航与来源说明,具体事实请以原文为准。
为什么值得关注
Stagehand has released stagehand-python@4.2.0a0.dev1526 via mirrored PR 2987. Previously, generated Python SDK models were excluded from type checking with ty, allowing schema-to-Python typing mismatches to remain undetected. This update upgrades and pins ty to version 0.0.82, expands type checks to cover generated code, and applies stricter validation rules. Key changes include generating validated model factories for dictionary defaults typed as Pydantic models, resolving Chrome process and return-type typing diagnostics, enforcing @override decorators (introducing typing extensions as a runtime dependency), and running ty immediately after Python generation.
可执行摘要
Release stagehand-python@4.2.0a0.dev1526 pins ty to 0.0.82 and includes generated Python models in ty checks. It adds model factories for Pydantic-typed dict defaults, enforces @override decorators via typing extensions, fixes Chrome process return-type diagnostics, and integrates ty into code generation workflows.
- Agent 实用度
- 82/100
- 可信度
- 96%
- 机器格式
- JSON + Markdown
开发者应核对什么
- Verify compatibility with the updated Python SDK pre-release (4.2.0a0.dev1526) if performing static type analysis in downstream applications.
- Ensure runtime environments accommodate any newly added typing-extensions dependencies if not already installed.