]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] Improve documentation for typing.get_type_hints (GH-119928) (#119943)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 2 Jun 2024 15:29:25 +0000 (17:29 +0200)
committerGitHub <noreply@github.com>
Sun, 2 Jun 2024 15:29:25 +0000 (15:29 +0000)
commitcfec22ce19042e3e8d2b3d5d9e4b4ba57daae886
treebc2aa07e208a70853ef9648474644a86a557d0cd
parent9d3de7b0edf46cc0f6aed586111464b2ad581f5a
[3.13] Improve documentation for typing.get_type_hints (GH-119928) (#119943)

- Explicit list of what it does that is different from
  "just return __annotations__"
- Remove reference to PEP 563; adding the future import doesn't
  do anything to type aliases, and in general it will never make
  get_type_hints() less likely to fail.
- Remove example, as the Annotated docs already have a similar
  example, and it's unbalanced to have one example about this
  one edge case but not about other behaviors of the function.

(cherry picked from commit aa9fe98e0649f0a151942914ef4e2810ca6126c2)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Doc/library/typing.rst