diff --git a/enumfields/enums.py b/enumfields/enums.py index 1da3a1d..5d20e34 100644 --- a/enumfields/enums.py +++ b/enumfields/enums.py @@ -14,7 +14,7 @@ def __new__(mcs, name, bases, attrs): if Labels is not None and inspect.isclass(Labels): del attrs['Labels'] if hasattr(attrs, '_member_names'): - attrs._member_names.remove('Labels') + del attrs._member_names['Labels'] if sys.version_info >= (3, 9, 2): attrs._cls_name = name