Skip to content

Commit 5ef742d

Browse files
committed
fix review idea
Signed-off-by: Manjusaka <me@manjusaka.me>
1 parent c63a6b2 commit 5ef742d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/library/annotationlib.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,11 +442,13 @@ Functions
442442

443443
.. versionadded:: 3.14
444444

445+
.. _support-annotations-custom-objects:
446+
445447
Supporting annotations in custom objects
446448
-------------------------------------------
447449

448450
Objects can support annotation introspection by implementing the :attr:`~object.__annotate__`
449-
protocol. When an object provides an :attr:`!__annotate__` attribute, :func:`get_annotations`
451+
protocol. When an object’s class provides an :attr:`!__annotate__` attribute, :func:`get_annotations`
450452
will call it to retrieve the annotations for that object. The :attr:`!__annotate__` function
451453
should accept a single argument, a member of the :class:`Format` enum, and return a dictionary
452454
mapping annotation names to their values in the requested format.

0 commit comments

Comments
 (0)