diff --git a/graphene/types/enum.py b/graphene/types/enum.py index 7b8e71f5..997cc0ae 100644 --- a/graphene/types/enum.py +++ b/graphene/types/enum.py @@ -1,7 +1,4 @@ from collections import OrderedDict - -import six - from graphene.utils.subclass_with_meta import SubclassWithMeta_Meta from ..pyutils.compat import Enum as PyEnum @@ -66,7 +63,7 @@ class EnumMeta(SubclassWithMeta_Meta): return type(meta_class.enum.__name__, (Enum,), {"Meta": meta_class}) -class Enum(six.with_metaclass(EnumMeta, UnmountedType, BaseType)): +class Enum(UnmountedType, BaseType, metaclass=EnumMeta): @classmethod def __init_subclass_with_meta__(cls, enum=None, _meta=None, **options): if not _meta: diff --git a/graphene/utils/subclass_with_meta.py b/graphene/utils/subclass_with_meta.py index 01fc5375..600de3d8 100644 --- a/graphene/utils/subclass_with_meta.py +++ b/graphene/utils/subclass_with_meta.py @@ -1,7 +1,5 @@ from inspect import isclass -import six - from ..pyutils.init_subclass import InitSubclassMeta from .props import props @@ -18,7 +16,7 @@ class SubclassWithMeta_Meta(InitSubclassMeta): return "<{} meta={}>".format(cls.__name__, repr(cls._meta)) -class SubclassWithMeta(six.with_metaclass(SubclassWithMeta_Meta)): +class SubclassWithMeta(metaclass=SubclassWithMeta_Meta): """This class improves __init_subclass__ to receive automatically the options from meta""" # We will only have the metaclass in Python 2