mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-14 05:36:45 +03:00
Improved enum attrs
This commit is contained in:
parent
19dff03784
commit
b17f081906
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user