File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -83,29 +83,32 @@ class DjangoEnumPropertiesMeta(ChoicesMeta): # type: ignore
8383 Needs to be strict subclass of same metaclass as Enum to make it to
8484 the ImportError.
8585 """
86- def __new__ ( mcs , * args , ** kwargs ): # pylint: disable=W0231
86+ def __init__ ( self , * args , ** kwargs ): # pylint: disable=W0231
8787 raise ImportError (
88- f'{ mcs .__name__ } requires enum-properties to be '
88+ f'{ self . __class__ .__name__ } requires enum-properties to be '
8989 f'installed.'
9090 )
9191
9292 class TextChoices ( # type: ignore
9393 DjangoSymmetricMixin ,
9494 str ,
95- Choices
95+ Choices ,
96+ metaclass = ChoicesMeta
9697 ):
9798 """Raises ImportError on class definition"""
9899
99100 class IntegerChoices ( # type: ignore
100101 DjangoSymmetricMixin ,
101102 int ,
102- Choices
103+ Choices ,
104+ metaclass = ChoicesMeta
103105 ):
104106 """Raises ImportError on class definition"""
105107
106108 class FloatChoices ( # type: ignore
107109 DjangoSymmetricMixin ,
108110 float ,
109- Choices
111+ Choices ,
112+ metaclass = ChoicesMeta
110113 ):
111114 """Raises ImportError on class definition"""
You can’t perform that action at this time.
0 commit comments