Improved enum attrs

This commit is contained in:
Syrus Akbary 2016-06-06 00:05:00 -07:00
parent 19dff03784
commit b17f081906

View File

@ -54,7 +54,7 @@ class EnumTypeMeta(ClassTypeMeta):
if not cls._meta.enum: if not cls._meta.enum:
cls._meta.enum = type(cls.__name__, (PyEnum,), attrs) cls._meta.enum = type(cls.__name__, (PyEnum,), attrs)
return super(EnumTypeMeta, cls).construct(bases, cls._meta.enum.__members__) return super(EnumTypeMeta, cls).construct(bases, dict(attrs, **cls._meta.enum.__members__))
def __call__(cls, *args, **kwargs): def __call__(cls, *args, **kwargs):
if cls._meta.abstract: if cls._meta.abstract: