Skip to content

Commit 4995ef6

Browse files
committed
more fixes
1 parent 37e91e3 commit 4995ef6

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
@@ -15,7 +15,6 @@
1515
from django.db.models import TextField
1616
from django.db.models.expressions import BaseExpression
1717
from django.db.models.sql.compiler import SQLCompiler
18-
from django.forms import Field as FormField
1918
from django.utils.translation import gettext_lazy as _
2019

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

7776
@property
78-
def description(self) -> Any:
77+
def description(self) -> str:
7978
return _("List of %(base_description)s") % {
8079
"base_description": self.base_field.description
8180
}
@@ -155,7 +154,7 @@ def value_to_string(self, obj: Any) -> str:
155154
vals = self.value_from_object(obj)
156155
return self.get_prep_value(vals)
157156

158-
def formfield(self, **kwargs: Any) -> FormField:
157+
def formfield(self, **kwargs: Any) -> Any:
159158
defaults = {
160159
"form_class": SimpleListField,
161160
"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
@@ -697,7 +697,7 @@ def approx_count(queryset: models.QuerySet) -> int:
697697
)
698698
# N.B. when we support more complex QuerySets they should be estimated
699699
# with 'EXPLAIN SELECT'
700-
approx_count = cursor.fetchone()[0]
700+
approx_count: int = cursor.fetchone()[0]
701701
return approx_count
702702

703703

0 commit comments

Comments
 (0)