Skip to content

Commit

Permalink
Remove six.with_metaclass calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Eran Kampf committed Jun 2, 2019
1 parent 3c0549a commit dd368ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions graphene/types/enum.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -66,7 +63,7 @@ def from_enum(cls, enum, description=None, deprecation_reason=None): # noqa: N8
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:
Expand Down
4 changes: 1 addition & 3 deletions graphene/utils/subclass_with_meta.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from inspect import isclass

import six

from ..pyutils.init_subclass import InitSubclassMeta
from .props import props

Expand All @@ -18,7 +16,7 @@ def __repr__(cls):
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
Expand Down

0 comments on commit dd368ec

Please sign in to comment.