fix: use typing.Tuple for annotations

This commit is contained in:
Jacob Fredericksen 2023-12-06 13:43:02 -05:00
parent 08086b00c6
commit 289e86e03f
2 changed files with 5 additions and 3 deletions

View file

@ -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.

View file

@ -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.