| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
This change adds the sunder names `_generate_next_value_` and `_missing_` to the `__dir__` method of `EnumType` and `Enum`. In Addition, The instance level sunder names `_add_alias_` and `_add_value_alias_` are added to `Enum.__dir__`. With the sunder names exposed in the `dir()` method, the REPL autocomplete will also show them. Co-Authored-By: SimonGPrs <107691772+SimonGPrs@users.noreply.github.com>
This change highlights which of the attributes were expected versus were actually there.
|
Please don't force push, it complicates reviewing. All commits are squashed at the end anyway. |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
The problem was that `_generate_next_value_` is a staticmethod and thus the expected object is in the `__dict__` of the `Color` class.
Documentation build overview12 files changed · ± 12 modified ± Modified |
Sorry, something went wrong.
|
I guess I have to update (via merge) this branch with changes from main to get the tests pass, right? |
Sorry, something went wrong.
|
Thanks for updating my branch, @ethanfurman! Any idea how we can fix the failing docs test? 🤔 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This change adds the sunder names _generate_next_value_ and _missing_ to the __dir__ method of EnumType and Enum.
In Addition, The instance level sunder names _add_alias_ and _add_value_alias_ are added to Enum.__dir__.
With the sunder names exposed in the dir() method, the REPL autocomplete will also show them.
Note: This PR is based on the first attempt to address this issue: #139418
Preview:
📚 Documentation preview 📚: https://cpython-previews--139985.org.readthedocs.build/