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 15
15
from django .db .models import TextField
16
16
from django .db .models .expressions import BaseExpression
17
17
from django .db .models .sql .compiler import SQLCompiler
18
- from django .forms import Field as FormField
19
18
from django .utils .translation import gettext_lazy as _
20
19
21
20
from django_mysql .forms import SimpleListField
@@ -75,7 +74,7 @@ def check(self, **kwargs: Any) -> list[checks.CheckMessage]:
75
74
return errors
76
75
77
76
@property
78
- def description (self ) -> Any :
77
+ def description (self ) -> str :
79
78
return _ ("List of %(base_description)s" ) % {
80
79
"base_description" : self .base_field .description
81
80
}
@@ -155,7 +154,7 @@ def value_to_string(self, obj: Any) -> str:
155
154
vals = self .value_from_object (obj )
156
155
return self .get_prep_value (vals )
157
156
158
- def formfield (self , ** kwargs : Any ) -> FormField :
157
+ def formfield (self , ** kwargs : Any ) -> Any :
159
158
defaults = {
160
159
"form_class" : SimpleListField ,
161
160
"base_field" : self .base_field .formfield (),
Original file line number Diff line number Diff line change @@ -697,7 +697,7 @@ def approx_count(queryset: models.QuerySet) -> int:
697
697
)
698
698
# N.B. when we support more complex QuerySets they should be estimated
699
699
# with 'EXPLAIN SELECT'
700
- approx_count = cursor .fetchone ()[0 ]
700
+ approx_count : int = cursor .fetchone ()[0 ]
701
701
return approx_count
702
702
703
703
You can’t perform that action at this time.
0 commit comments