Skip to content

Commit eaf8fd4

Browse files
committed
more fixes
1 parent 3901b81 commit eaf8fd4

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
@@ -7,7 +7,6 @@
77
from django.db.models import CharField, Field, IntegerField, Lookup, Model, TextField
88
from django.db.models.expressions import BaseExpression
99
from django.db.models.sql.compiler import SQLCompiler
10-
from django.forms import Field as FormField
1110
from django.utils.translation import gettext_lazy as _
1211

1312
from django_mysql.forms import SimpleListField
@@ -66,7 +65,7 @@ def check(self, **kwargs: Any) -> list[checks.CheckMessage]:
6665
return errors
6766

6867
@property
69-
def description(self) -> Any:
68+
def description(self) -> str:
7069
return _("List of %(base_description)s") % {
7170
"base_description": self.base_field.description
7271
}
@@ -146,7 +145,7 @@ def value_to_string(self, obj: Any) -> str:
146145
vals = self.value_from_object(obj)
147146
return self.get_prep_value(vals)
148147

149-
def formfield(self, **kwargs: Any) -> FormField:
148+
def formfield(self, **kwargs: Any) -> Any:
150149
defaults = {
151150
"form_class": SimpleListField,
152151
"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
@@ -699,7 +699,7 @@ def approx_count(queryset: models.QuerySet) -> int:
699699
)
700700
# N.B. when we support more complex QuerySets they should be estimated
701701
# with 'EXPLAIN SELECT'
702-
approx_count = cursor.fetchone()[0]
702+
approx_count: int = cursor.fetchone()[0]
703703
return approx_count
704704

705705

0 commit comments

Comments
 (0)