mirror of
https://github.com/jazzband/django-eav2.git
synced 2026-03-16 22:40:26 +00:00
fix: use typing.Tuple for annotations
This commit is contained in:
parent
08086b00c6
commit
289e86e03f
2 changed files with 5 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from typing import TYPE_CHECKING, Any
|
||||
from typing import TYPE_CHECKING, Any, Tuple
|
||||
|
||||
from django.db import models
|
||||
from django.db.models import ManyToManyField
|
||||
|
|
@ -47,7 +47,7 @@ class EnumGroup(models.Model):
|
|||
"""String representation of `EnumGroup` object."""
|
||||
return f'<EnumGroup {self.name}>'
|
||||
|
||||
def natural_key(self) -> tuple[str]:
|
||||
def natural_key(self) -> Tuple[str]:
|
||||
"""
|
||||
Retrieve the natural key for the EnumGroup instance.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
from typing import Tuple
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
|
@ -58,7 +60,7 @@ class EnumValue(models.Model):
|
|||
"""String representation of `EnumValue` object."""
|
||||
return f'<EnumValue {self.value}>'
|
||||
|
||||
def natural_key(self) -> tuple[str]:
|
||||
def natural_key(self) -> Tuple[str]:
|
||||
"""
|
||||
Retrieve the natural key for the EnumValue instance.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue