bpo-46269: [Enum] remove special-casing of __new__ in EnumType.__dir__ (GH-30421)

This commit is contained in:
Nikita Sobolev 2022-01-05 20:06:02 +03:00 committed by GitHub
parent 43aac29cbb
commit 817a6bc9f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View File

@ -652,10 +652,6 @@ class EnumType(type):
# if and only if they have been user-overridden
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:
# Ignore any classes defined in this module
if cls is object or is_from_this_module(cls):

View File

@ -0,0 +1 @@
Remove special-casing of ``__new__`` in :meth:`enum.Enum.__dir__`.