File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 14
14
from django .db .models import TextField
15
15
from django .db .models .expressions import BaseExpression
16
16
from django .db .models .sql .compiler import SQLCompiler
17
- from django .forms import Field as FormField
18
17
from django .utils .translation import gettext_lazy as _
19
18
20
19
from django_mysql .forms import SimpleListField
@@ -74,7 +73,7 @@ def check(self, **kwargs: Any) -> list[checks.CheckMessage]:
74
73
return errors
75
74
76
75
@property
77
- def description (self ) -> Any :
76
+ def description (self ) -> str :
78
77
return _ ("List of %(base_description)s" ) % {
79
78
"base_description" : self .base_field .description
80
79
}
@@ -154,7 +153,7 @@ def value_to_string(self, obj: Any) -> str:
154
153
vals = self .value_from_object (obj )
155
154
return self .get_prep_value (vals )
156
155
157
- def formfield (self , ** kwargs : Any ) -> FormField :
156
+ def formfield (self , ** kwargs : Any ) -> Any :
158
157
defaults = {
159
158
"form_class" : SimpleListField ,
160
159
"base_field" : self .base_field .formfield (),
Original file line number Diff line number Diff line change @@ -706,7 +706,7 @@ def approx_count(queryset: models.QuerySet) -> int:
706
706
)
707
707
# N.B. when we support more complex QuerySets they should be estimated
708
708
# with 'EXPLAIN SELECT'
709
- approx_count = cursor .fetchone ()[0 ]
709
+ approx_count : int = cursor .fetchone ()[0 ]
710
710
return approx_count
711
711
712
712
You can’t perform that action at this time.
0 commit comments