mirror of
https://github.com/jazzband/django-eav2.git
synced 2026-05-23 06:35:55 +00:00
fix: replace Optional[X] type hints with X | None (UP045)
This commit is contained in:
parent
72ede7357b
commit
39b4a46cb8
2 changed files with 4 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import warnings
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.core.exceptions import ValidationError
|
||||
|
|
@ -163,7 +163,7 @@ class Attribute(models.Model):
|
|||
:meth:`~eav.registry.EavConfig.get_attributes` method of that entity's config.
|
||||
"""
|
||||
|
||||
enum_group: ForeignKey[Optional[EnumGroup]] = ForeignKey(
|
||||
enum_group: ForeignKey[EnumGroup | None] = ForeignKey(
|
||||
"eav.EnumGroup",
|
||||
on_delete=models.PROTECT,
|
||||
blank=True,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, ClassVar, Optional
|
||||
from typing import TYPE_CHECKING, ClassVar
|
||||
|
||||
from django.contrib.contenttypes import fields as generic
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
|
|
@ -136,7 +136,7 @@ class Value(models.Model):
|
|||
verbose_name=_("Value JSON"),
|
||||
)
|
||||
|
||||
value_enum: ForeignKey[Optional[EnumValue]] = ForeignKey(
|
||||
value_enum: ForeignKey[EnumValue | None] = ForeignKey(
|
||||
"eav.EnumValue",
|
||||
blank=True,
|
||||
null=True,
|
||||
|
|
|
|||
Loading…
Reference in a new issue