Skip to content

Redundant if statement in EnumType._find_data_type_() in enum.py #103215

@sadra-barikbin

Description

@sadra-barikbin

This statement is redundant:

cpython/Lib/enum.py

Lines 996 to 997 in 8236222

if isinstance(base, EnumType):
continue

in

cpython/Lib/enum.py

Lines 990 to 997 in 8236222

continue
elif isinstance(base, EnumType):
if base._member_type_ is not object:
data_types.add(base._member_type_)
break
elif '__new__' in base.__dict__ or '__init__' in base.__dict__:
if isinstance(base, EnumType):
continue

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directory

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions