Skip to content

Commit 6999d68

Browse files
committed
fix python 3.11
1 parent 363fd60 commit 6999d68

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

django_enum/choices.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ class FloatChoices(
6363
"""
6464

6565
except (ImportError, ModuleNotFoundError):
66+
from enum import Enum
6667

67-
class MissingEnumProperties:
68+
# 3.11 - extend from Enum so base type check does not throw type error
69+
class MissingEnumProperties(Enum):
6870
"""Throw error if choice types are used without enum-properties"""
6971

7072
def __init__(self, *args, **kwargs):

0 commit comments

Comments
 (0)