-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
gh-136672: Docs: Move Enum functions and add examples #136791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
gh-136672: Docs: Move Enum functions and add examples #136791
Conversation
Thanks for reviewing, @AA-Turner 🙃 |
When the `Enum` functions `_add_alias_` and `_add_value_alias_` were added in de6bca9, the documentation for them was done under `EnumType` instead of `Enum`. This change moves them to the docs of the `Enum` class and adds an example for each function.
This change moves the `versionadded` for `EnumType` to the top. Additionally, it fixes the indentation of another `versionchanged` entry.
69e75be
to
4b25a5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly good, just one small change.
- :meth:`~Enum._add_alias_` -- adds a new name as an alias to an existing | ||
member. | ||
- :meth:`~EnumType._add_value_alias_` -- adds a new value as an alias to an | ||
- :meth:`~Enum._add_value_alias_` -- adds a new value as an alias to an | ||
existing member. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move these lines to the bottom of the list.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @RafaelWO! Please could you have a look at Ethan's suggestions.
A
When the
Enum
functions_add_alias_
and_add_value_alias_
were added in de6bca9, the documentation for them was done underEnumType
instead ofEnum
.This change moves them to the docs of the
Enum
class and adds an example for each function.Additionally, it moves the
versionadded
forEnumType
to the top and fixes the indentation of anotherversionchanged
entry.📚 Documentation preview 📚: https://cpython-previews--136791.org.readthedocs.build/