python / python/cpython

Update annotation parameters for objects in documentation

Open
#129,667 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the missing parameter in the http.server.HTTPServer documentation and review PR #129669. Then examine the proposed Sphinx or CI-check approach using inspect and an rst parser. Done means an implementation path and scope for detecting annotation/documentation discrepancies are agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, tooling
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.