https://github.com/python/cpython/commit/2a0fa500f82fc160feb726c0631f58c9a2f76796
commit: 2a0fa500f82fc160feb726c0631f58c9a2f76796
branch: main
author: wavebyrd <[email protected]>
committer: JelleZijlstra <[email protected]>
date: 2026-03-16T12:25:31-07:00
summary:

gh-145870: Fix Format.SOURCE reference in get_annotations docstring (#145889)

The get_annotations() docstring incorrectly referred to the SOURCE
format, which was renamed to STRING during PEP 749 development.

Co-authored-by: Carson Jones <[email protected]>

files:
M Lib/annotationlib.py

diff --git a/Lib/annotationlib.py b/Lib/annotationlib.py
index 832d160de7f4e5..df8fb5e4c62079 100644
--- a/Lib/annotationlib.py
+++ b/Lib/annotationlib.py
@@ -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:

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to