fix review idea

Signed-off-by: Manjusaka <me@manjusaka.me>
This commit is contained in:
Manjusaka 2025-12-14 03:35:03 +08:00
parent 7cddaca188
commit f6fe897c1d
No known key found for this signature in database
GPG key ID: 878F445D9C6CE65E

View file

@ -448,7 +448,7 @@ Supporting annotations in custom objects
-------------------------------------------
Objects can support annotation introspection by implementing the :attr:`~object.__annotate__`
protocol. When an object provides an :attr:`!__annotate__` attribute, :func:`get_annotations`
protocol. When an object's class provides an :attr:`!__annotate__` descriptor, :func:`get_annotations`
will call it to retrieve the annotations for that object. The :attr:`!__annotate__` function
should accept a single argument, a member of the :class:`Format` enum, and return a dictionary
mapping annotation names to their values in the requested format.