mirror of
https://github.com/graphql-python/graphene.git
synced 2025-09-21 11:22:33 +03:00
Remove six.with_metaclass
calls
This commit is contained in:
parent
3c0549a0b0
commit
dd368ec825
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user