(
    bases, name, qualname, members, module, class_tracker_id, extra
)
return _lookup_class_or_track(class_tracker_id, enum_class)
Build dynamic enum with an empty __dict__ to be filled once memoized

    The creation of the enum class is inspired by the code of
    EnumMeta._create_.

    If class_tracker_id is not None, try to lookup an existing enum definition
    matching that id. If none is found, track a newly reconstructed enum
    definition under that id so that other instances stemming from the same
    class id will also reuse this enum definition.

    The "extra" variable is meant to be a dict (or None) that can be used for
    forward compatibility shall the need arise.
Build dynamic enum with an empty __dict__ to be filled once memoized
Build dynamic enum with an empty __dict__ to be filled once memoized
def _make_skeleton_enum(
    bases, name, qualname, members, module, class_tracker_id, extra
):
    """Build dynamic enum with an empty __dict__ to be filled once memoized

    The creation of the enum class is inspired by the code of
    EnumMeta._create_.

    If class_tracker_id is not None, try to lookup an existing enum definition
    matching that id. If none is found, track a newly reconstructed enum
    definition under that id so that other instances stemming from the same
    class id will also reuse this enum definition.

    The "extra" variable is meant to be a dict (or None) that can be used for
    forward compatibility shall the need arise.
    """
    # enums always inherit from their base Enum class at the last position in
    # the list of base classes:
    enum_base = bases[-1]
    metacls = enum_base.__class__
    classdict = metacls.__prepare__(name, bases)

    for member_name, member_value in members.items():
        classdict[member_name] = member_value
    enum_class = metacls.__new__(metacls, name, bases, classdict)
    enum_class.__module__ = module

    # Python 2.7 compat
    if qualname is not None:
        enum_class.__qualname__ = qualname

    return _lookup_class_or_track(class_tracker_id, enum_class)
def _make_skeleton_enum ( bases , name , qualname , members , module , class_tracker_id , extra ) : # enums always inherit from their base Enum class at the last position in # the list of base classes: enum_base = bases [ - 1 ] metacls = enum_base . __class__ classdict = metacls . __prepare__ ( name , bases ) for member_name , member_value in members . items ( ) : classdict [ member_name ] = member_value enum_class = metacls . __new__ ( metacls , name , bases , classdict ) enum_class . __module__ = module # Python 2.7 compat if qualname is not None : enum_class . __qualname__ = qualname return _lookup_class_or_track ( class_tracker_id , enum_class )