Fix malformed README quickstart fence and non-runnable timeout snippet

未关闭 适合新手
#176 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
冷清
技术栈
python
领域
documentation

调研方向

从 README.md 的第 27-68 行开始,检查 quickstart fence,然后查看第 230-247 行的 timeout 示例。将完整的 quickstart 保留在一个 Python fence 中,并确保 timeout snippet 包含其所需的 import。渲染 README 并运行独立的 snippet,以验证这些示例可执行。

由索引模型根据 Issue 内容生成。

描述

Description

The README quickstart closes its Python fence immediately after session creation (README.md:43), leaving the Playwright run() function as plain Markdown, then opens an unintended fence at README.md:67. This corrupts the rendered structure around the primary usage example and the following Examples section.

A second runnable-snippet problem appears in the timeout example: README.md:241 calls httpx.Timeout(...), but that code block imports only Browserbase and never imports httpx.

Reproduction

  1. Render README.md on GitHub/PyPI, or track fence state from lines 27-68.
  2. Observe that lines 46-66 are outside the Python block and line 68 (## Examples) is inside the next fence.
  3. Copy the timeout block at lines 230-247 into a Python process; it raises NameError: name 'httpx' is not defined at line 241.

Expected behavior

  • The entire quickstart (imports, session creation, run(), and main guard) should be within one Python fence.
  • Each advertised standalone snippet should contain the imports it needs, including import httpx for the granular timeout example.

Actual behavior

The primary README example is malformed when rendered, and the timeout example is not executable as shown.

Why it matters

README content is also used for the package metadata/PyPI page, so these errors affect the first-run path for both GitHub and PyPI users. A lightweight docs test that extracts/compiles Python fences would prevent recurrence.

主要语言
Python
星标
93
派生
16
平均合并
11 分钟
30 天内合并 PR
3

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

browserbase/sdk-python 的其他 Issue

查看 browserbase/sdk-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。