python / python/cpython

Update annotation parameters for objects in documentation

未关闭
#129,667 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

docs
主要语言
Python
星标
77.2k
派生
35.9k
PR 合并指标
PR 指标待抓取

描述

Working on PR #129607 noticed that one parameter was missing in http.server.HTTPServer documentation, so I decided to send a separate PR to update the documentation and at the same time check some more entities in the stdlib.

And I started to finding a lot of such cases and wanted to automate it. Then I found out that sphinx already has something similar to do automatically now I offer you this as an idea. Maybe it is possible to include such a feature in sphinx or write your own script so that it checks this in CI (for example using inspect and rst parser).

It seems very important to me that the documentation is accurate in such things and doesn't become outdated

I don't think it's a good practice for contributors to change parameters in the documentation themselves (or forget about it :-).
At least we could report discrepancies between documentation and annotations from code.

I'll send PR with what I've already found.

Linked PRs
  • gh-129669

贡献指南

打开贡献指南

从这里开始

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

调研方向

从 http.server.HTTPServer 文档中缺失的参数开始,并审查 PR #129669。然后,研究使用 inspect 和 rst 解析器的 Sphinx 或 CI-check 方案。确定了用于检测注解与文档之间差异的实现路径和范围后,即视为完成。

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

评估

技术栈
python
领域
documentation, tooling
Issue 类型
文档
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

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