[3.14] gh-145870: Fix Format.SOURCE reference in get_annotations docstring (GH-145889) (GH-146036)

The get_annotations() docstring incorrectly referred to the SOURCE
format, which was renamed to STRING during PEP 749 development.
(cherry picked from commit 2a0fa500f8)

Co-authored-by: wavebyrd <160968744+wavebyrd@users.noreply.github.com>
Co-authored-by: Carson Jones <carson@Carsons-MacBook-Pro.local>
This commit is contained in:
Miss Islington (bot) 2026-03-24 00:29:53 +01:00 committed by GitHub
parent d64665b6ae
commit c1df96a930
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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: