← 输入框|github.com|刷新
Skip to content

Document guidance on type annotations - #1939

Open
badrisatyam1-ctrl wants to merge 2 commits into
python:mainfrom
badrisatyam1-ctrl:codex/type-annotations-guidance
Open

badrisatyam1-ctrl wants to merge 2 commits into
python:mainfrom
badrisatyam1-ctrl:codex/type-annotations-guidance

Conversation

@badrisatyam1-ctrl

@badrisatyam1-ctrl badrisatyam1-ctrl commented Oct 27, 2026 •

Copy link
Copy Markdown

Closes #1304

Summary

  • Document CPython's current practice for type annotations in standard-library modules.
  • Explain the role of typeshed, acknowledge existing annotated modules and tools, and distinguish source annotations from user-facing documentation.
  • Link to the core development discussion that records the rationale and current state.

Validation

  • Read the rendered page in the successful Read the Docs preview build.
  • pre-commit.ci passed.
  • git diff --check passed.
  • The local Windows docs build could not install the full pinned requirements: sphinx_linklint was unavailable from the package index and Sphinx 9.1+ requires Python 3.12, while the available interpreters are Python 3.11 and 3.14. The hosted docs build succeeded.

@python-cla-bot

python-cla-bot Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

read-the-docs-community Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

@StanFromIreland

Copy link
Copy Markdown
Member

Please sign the CLA, we cannot review otherwise.

@StanFromIreland
StanFromIreland marked this pull request as draft October 27, 2026 12:51
@badrisatyam1-ctrl
badrisatyam1-ctrl marked this pull request as ready for review October 27, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify usage of type hints in the standard-library modules

2 participants