| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Omg, did not mean to close that at all — sorry!! |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for your work! Enums' text representation looks way better now.
Sorry, something went wrong.
|
This change appears to be causing CI to fail on docs for unrelated PRs ☹️ https://github.com/python/cpython/runs/4831439882?check_suite_focus=true |
Sorry, something went wrong.
…ythonGH-30582)" (pythonGH-30632)" This reverts commit 42a64c0.
|
I'm curious: why does this define a __init__ for Enum which does nothing at all (just pass)? It causes pylint to start throwing warnings about subclasses of Enum which have their own __init__ not calling super's __init__, which Python's own docs and examples don't say they should, and which of course would be pointless since it does nothing. I'm sending a PR for pylint to not emit this warning for subclasses of Enum, but I don't understand why the do-nothing __init__ was added at all. |
Sorry, something went wrong.
| @@ -2567,30 +2567,28 @@ class _empty: | |||
|
|
|||
|
|
|||
| class _ParameterKind(enum.IntEnum): | |||
There was a problem hiding this comment.
Is that inheritting correct where the values are changed to str?
Sorry, something went wrong.
There was a problem hiding this comment.
@gryznar Good question: only because the __new__ uses integers as the values, and the "value" on the assignment line is saved in the description attribute. Without the custom __new__ the enum creation would have failed, since strings are not integers.
Sorry, something went wrong.
| if invalid_names: | ||
| raise ValueError('Invalid enum member name: {0}'.format( | ||
| ','.join(invalid_names))) | ||
| raise ValueError('invalid enum member name(s) '.format( |
There was a problem hiding this comment.
Is removing "{0}" proper?
Sorry, something went wrong.
There was a problem hiding this comment.
@gryznar Only because it was changed to %s later.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
https://bugs.python.org/issue40066