mirror of
https://github.com/python/cpython.git
synced 2025-12-03 16:19:41 +00:00
bpo-46269: [Enum] remove special-casing of __new__ in EnumType.__dir__ (GH-30421)
This commit is contained in:
parent
43aac29cbb
commit
817a6bc9f7
2 changed files with 1 additions and 4 deletions
|
|
@ -652,10 +652,6 @@ class EnumType(type):
|
||||||
# if and only if they have been user-overridden
|
# if and only if they have been user-overridden
|
||||||
enum_dunders = set(filter(_is_dunder, enum_dict))
|
enum_dunders = set(filter(_is_dunder, enum_dict))
|
||||||
|
|
||||||
# special-case __new__
|
|
||||||
if self.__new__ is not first_enum_base.__new__:
|
|
||||||
add_to_dir('__new__')
|
|
||||||
|
|
||||||
for cls in mro:
|
for cls in mro:
|
||||||
# Ignore any classes defined in this module
|
# Ignore any classes defined in this module
|
||||||
if cls is object or is_from_this_module(cls):
|
if cls is object or is_from_this_module(cls):
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Remove special-casing of ``__new__`` in :meth:`enum.Enum.__dir__`.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue