]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-145870: Fix Format.SOURCE reference in get_annotations docstring (#145889)
authorwavebyrd <160968744+wavebyrd@users.noreply.github.com>
Mon, 16 Mar 2026 19:25:31 +0000 (15:25 -0400)
committerGitHub <noreply@github.com>
Mon, 16 Mar 2026 19:25:31 +0000 (12:25 -0700)
The get_annotations() docstring incorrectly referred to the SOURCE
format, which was renamed to STRING during PEP 749 development.

Co-authored-by: Carson Jones <carson@Carsons-MacBook-Pro.local>
Lib/annotationlib.py

index 832d160de7f4e596f7e451f28cd6b8479ba312f3..df8fb5e4c6207984d95bfd45852f55f2b6322f6f 100644 (file)
@@ -919,7 +919,7 @@ def get_annotations(
     does not exist, the __annotate__ function is called. The
     FORWARDREF format uses __annotations__ if it exists and can be
     evaluated, and otherwise falls back to calling the __annotate__ function.
-    The SOURCE format tries __annotate__ first, and falls back to
+    The STRING format tries __annotate__ first, and falls back to
     using __annotations__, stringified using annotations_to_string().
 
     This function handles several details for you: