Skip to content

Commit 1bbc110

Browse files
committed
more fixes
1 parent 31b3459 commit 1bbc110

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
@@ -706,7 +706,7 @@ def approx_count(queryset: models.QuerySet) -> int:
706706
)
707707
# N.B. when we support more complex QuerySets they should be estimated
708708
# with 'EXPLAIN SELECT'
709-
approx_count = cursor.fetchone()[0]
709+
approx_count: int = cursor.fetchone()[0]
710710
return approx_count
711711

712712

0 commit comments

Comments
 (0)