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
2 changes: 1 addition & 1 deletion src/django_enum/choices.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
ChoicesType = (
model_enums.ChoicesType
if django_version[0:2] >= (5, 0)
else model_enums.ChoicesMeta
else getattr(model_enums, "ChoicesMeta") # removed in Django 5.0
)

DEFAULT_BOUNDARY = getattr(enum, "KEEP", None)
Expand Down
8 changes: 4 additions & 4 deletions src/django_enum/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,8 @@ def contribute_to_class(
constraint |= Q(**{f"{self.name or name}__isnull": True})
cls._meta.constraints = [
*cls._meta.constraints,
CheckConstraint(
check=constraint,
CheckConstraint( # type: ignore[call-arg]
check=constraint, # type: ignore[call-arg]
name=self.constraint_name(cls, self.name or name, self.enum),
)
if django_version[0:2] < (5, 1)
Expand Down Expand Up @@ -1254,8 +1254,8 @@ def contribute_to_class(

cls._meta.constraints = [
*cls._meta.constraints,
CheckConstraint(
check=constraint,
CheckConstraint( # type: ignore[call-arg]
check=constraint, # type: ignore[call-arg]
name=self.constraint_name(cls, self.name or name, self.enum),
)
if django_version[0:2] < (5, 1)
Expand Down
2 changes: 1 addition & 1 deletion src/django_enum/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def process_lhs(self, compiler, connection, lhs=None):
return lhs_sql, lhs_params

def get_rhs_op(self, connection, rhs):
return connection.operators["exact"] % rhs
return connection.operators["exact"] % rhs # type: ignore[attr-defined]


# class ExtraBigFlagMixin:
Expand Down
Loading