Skip to content

Commit

Permalink
name -> name_ for Enum __new__ function
Browse files Browse the repository at this point in the history
  • Loading branch information
jkimbo committed Jun 29, 2020
1 parent 3701aa4 commit ef7c1d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graphene/types/enum.py
Expand Up @@ -21,14 +21,14 @@ class EnumOptions(BaseOptions):


class EnumMeta(SubclassWithMeta_Meta):
def __new__(cls, name, bases, classdict, **options):
def __new__(cls, name_, bases, classdict, **options):
enum_members = dict(classdict, __eq__=eq_enum)
# We remove the Meta attribute from the class to not collide
# with the enum values.
enum_members.pop("Meta", None)
enum = PyEnum(cls.__name__, enum_members)
return SubclassWithMeta_Meta.__new__(
cls, name, bases, dict(classdict, __enum__=enum), **options
cls, name_, bases, dict(classdict, __enum__=enum), **options
)

def get(cls, value):
Expand Down

0 comments on commit ef7c1d2

Please sign in to comment.