Skip to content

Commit 7aeb183

Browse files
committed
more fixes
1 parent facdc62 commit 7aeb183

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/django_mysql/models/fields/lists.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from django.db.models import TextField
1515
from django.db.models.expressions import BaseExpression
1616
from django.db.models.sql.compiler import SQLCompiler
17-
from django.forms import Field as FormField
1817
from django.utils.translation import gettext_lazy as _
1918

2019
from django_mysql.forms import SimpleListField
@@ -74,7 +73,7 @@ def check(self, **kwargs: Any) -> list[checks.CheckMessage]:
7473
return errors
7574

7675
@property
77-
def description(self) -> Any:
76+
def description(self) -> str:
7877
return _("List of %(base_description)s") % {
7978
"base_description": self.base_field.description
8079
}
@@ -154,7 +153,7 @@ def value_to_string(self, obj: Any) -> str:
154153
vals = self.value_from_object(obj)
155154
return self.get_prep_value(vals)
156155

157-
def formfield(self, **kwargs: Any) -> FormField:
156+
def formfield(self, **kwargs: Any) -> Any:
158157
defaults = {
159158
"form_class": SimpleListField,
160159
"base_field": self.base_field.formfield(),

src/django_mysql/models/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ def approx_count(queryset: models.QuerySet) -> int:
698698
)
699699
# N.B. when we support more complex QuerySets they should be estimated
700700
# with 'EXPLAIN SELECT'
701-
approx_count = cursor.fetchone()[0]
701+
approx_count: int = cursor.fetchone()[0]
702702
return approx_count
703703

704704

0 commit comments

Comments
 (0)