Remove six.with_metaclass calls

This commit is contained in:
Eran Kampf 2019-06-01 18:56:18 -07:00
parent 3c0549a0b0
commit dd368ec825
2 changed files with 2 additions and 7 deletions

View File

@ -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:

View File

@ -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