diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2024-02-09 06:40:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-09 06:40:28 (GMT) |
commit | 553c90ccc2f5b15be76a2bb6e38d23e58d739e2f (patch) | |
tree | 878cc6a5e23cee34c86bdfac5015ebd05737ccc9 /Doc | |
parent | 5914a211ef5542edd1f792c2684e373a42647b04 (diff) | |
download | cpython-553c90ccc2f5b15be76a2bb6e38d23e58d739e2f.zip cpython-553c90ccc2f5b15be76a2bb6e38d23e58d739e2f.tar.gz cpython-553c90ccc2f5b15be76a2bb6e38d23e58d739e2f.tar.bz2 |
gh-101100: Fix sphinx warnings in `library/enum.rst` (#114696)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/enum.rst | 17 | ||||
-rw-r--r-- | Doc/tools/.nitignore | 1 |
2 files changed, 15 insertions, 3 deletions
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 5349399..30d80ce 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -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 @@ -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 diff --git a/Doc/tools/.nitignore b/Doc/tools/.nitignore index f96478b..9db02c5 100644 --- a/Doc/tools/.nitignore +++ b/Doc/tools/.nitignore @@ -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 |