Skip to content

Commit 03a81f6

Browse files
committed
fix import error
1 parent 80a4766 commit 03a81f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

django_enum/choices.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ 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 __init__(cls, *args, **kwargs): # pylint: disable=W0231
86+
def __new__(mcs, *args, **kwargs): # pylint: disable=W0231
8787
raise ImportError(
88-
f'{cls.__class__.__name__} requires enum-properties to be '
88+
f'{mcs.__name__} requires enum-properties to be '
8989
f'installed.'
9090
)
9191

0 commit comments

Comments
 (0)