Skip to content

Commit ca3eca1

Browse files
authored
[3.11] gh-101100: Fix sphinx warnings in library/enum.rst (GH-114696) (GH-115209)
1 parent ff72af8 commit ca3eca1

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

Doc/library/enum.rst

+24-12
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,19 @@ Data Types
277277
appropriate value will be chosen for you. See :class:`auto` for the
278278
details.
279279

280+
.. attribute:: Enum._name_
281+
282+
Name of the member.
283+
284+
.. attribute:: Enum._value_
285+
286+
Value of the member, can be set in :meth:`~object.__new__`.
287+
288+
.. attribute:: Enum._order_
289+
290+
No longer used, kept for backward compatibility.
291+
(class attribute, removed during class creation).
292+
280293
.. attribute:: Enum._ignore_
281294

282295
``_ignore_`` is only used during creation and is removed from the
@@ -766,18 +779,17 @@ all the members are created it is no longer used.
766779
Supported ``_sunder_`` names
767780
""""""""""""""""""""""""""""
768781

769-
- ``_name_`` -- name of the member
770-
- ``_value_`` -- value of the member; can be set / modified in ``__new__``
771-
772-
- ``_missing_`` -- a lookup function used when a value is not found; may be
773-
overridden
774-
- ``_ignore_`` -- a list of names, either as a :class:`list` or a :class:`str`,
775-
that will not be transformed into members, and will be removed from the final
776-
class
777-
- ``_order_`` -- used in Python 2/3 code to ensure member order is consistent
778-
(class attribute, removed during class creation)
779-
- ``_generate_next_value_`` -- used to get an appropriate value for an enum
780-
member; may be overridden
782+
- :attr:`~Enum._name_` -- name of the member
783+
- :attr:`~Enum._value_` -- value of the member; can be set in ``__new__``
784+
- :meth:`~Enum._missing_` -- a lookup function used when a value is not found;
785+
may be overridden
786+
- :attr:`~Enum._ignore_` -- a list of names, either as a :class:`list` or a
787+
:class:`str`, that will not be transformed into members, and will be removed
788+
from the final class
789+
- :attr:`~Enum._order_` -- no longer used, kept for backward
790+
compatibility (class attribute, removed during class creation)
791+
- :meth:`~Enum._generate_next_value_` -- used to get an appropriate value for
792+
an enum member; may be overridden
781793

782794
.. note::
783795

Doc/tools/.nitignore

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Doc/library/email.compat32-message.rst
3535
Doc/library/email.errors.rst
3636
Doc/library/email.parser.rst
3737
Doc/library/email.policy.rst
38-
Doc/library/enum.rst
3938
Doc/library/exceptions.rst
4039
Doc/library/faulthandler.rst
4140
Doc/library/fcntl.rst

0 commit comments

Comments
 (0)