Skip to content

Commit

Permalink
gh-101100: Fix sphinx warnings in library/enum.rst (#114696)
Browse files Browse the repository at this point in the history
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
  • Loading branch information
sobolevn and ethanfurman committed Feb 9, 2024
1 parent 5914a21 commit 553c90c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
17 changes: 15 additions & 2 deletions Doc/library/enum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,19 @@ Data Types
appropriate value will be chosen for you. See :class:`auto` for the
details.

.. attribute:: Enum._name_

Name of the member.

.. attribute:: Enum._value_

Value of the member, can be set in :meth:`~object.__new__`.

.. attribute:: Enum._order_

No longer used, kept for backward compatibility.
(class attribute, removed during class creation).

.. attribute:: Enum._ignore_

``_ignore_`` is only used during creation and is removed from the
Expand Down Expand Up @@ -823,8 +836,8 @@ Supported ``_sunder_`` names
- :attr:`~Enum._ignore_` -- a list of names, either as a :class:`list` or a
:class:`str`, that will not be transformed into members, and will be removed
from the final class
- :attr:`~Enum._order_` -- used in Python 2/3 code to ensure member order is
consistent (class attribute, removed during class creation)
- :attr:`~Enum._order_` -- no longer used, kept for backward
compatibility (class attribute, removed during class creation)
- :meth:`~Enum._generate_next_value_` -- used to get an appropriate value for
an enum member; may be overridden

Expand Down
1 change: 0 additions & 1 deletion Doc/tools/.nitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Doc/library/email.compat32-message.rst
Doc/library/email.errors.rst
Doc/library/email.parser.rst
Doc/library/email.policy.rst
Doc/library/enum.rst
Doc/library/exceptions.rst
Doc/library/faulthandler.rst
Doc/library/fcntl.rst
Expand Down

0 comments on commit 553c90c

Please sign in to comment.