Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions data_enum/data_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ class MemberDoesNotExistError(Exception):
class DataEnumMeta(type):
"""Metaclass for DataEnum that handles member registration and lookup."""

_data_attrs: dict[str, type]
_unique_attrs: frozenset[str]
_default_attrs: dict[str, Any]
_unique_together_groups: dict[str, tuple[str, ...]]
_unique_together_by_attrs: dict[frozenset[str], str]
_members_decl: tuple[str, ...]
_member_map: dict[str, DataEnum]
_unique_indexes: dict[str, dict[Any, DataEnum]]
_unique_together_indexes: dict[str, dict[tuple[Any, ...], DataEnum]]
_is_complete: bool
_instances_created: int

def __new__(
mcs,
name: str,
Expand Down Expand Up @@ -230,6 +242,8 @@ class DataEnum(metaclass=DataEnumMeta): # noqa: WPS338

__slots__ = ()

_name: str

def __init__(self, **kwargs: Any) -> None: # noqa: ANN401
"""Initialize a DataEnum member."""
enum_cls = type(self)
Expand Down
2 changes: 1 addition & 1 deletion requirements/develop.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ wemake-python-styleguide==1.8.0

ruff==0.16.5

ty==0.0.69
ty==0.0.75