@@ -20,9 +20,7 @@ class Article(models.Model):
2020 title = models .CharField (max_length = 10 )
2121
2222 class Meta :
23- indexes = [
24- SearchIndex (fields = ["title" ]),
25- ]
23+ indexes = [SearchIndex (fields = ["title" ])]
2624
2725 errors = checks .run_checks (app_configs = self .apps .get_app_configs (), databases = {"default" })
2826 self .assertEqual (
@@ -50,9 +48,7 @@ class Article(models.Model):
5048 title = models .CharField (max_length = 10 )
5149
5250 class Meta :
53- indexes = [
54- VectorSearchIndex (fields = ["title" ]),
55- ]
51+ indexes = [VectorSearchIndex (fields = ["title" ])]
5652
5753 errors = checks .run_checks (app_configs = self .apps .get_app_configs (), databases = {"default" })
5854 self .assertEqual (
@@ -76,9 +72,7 @@ class Article(models.Model):
7672 title_embedded = ArrayField (models .FloatField ())
7773
7874 class Meta :
79- indexes = [
80- VectorSearchIndex (fields = ["title_embedded" ]),
81- ]
75+ indexes = [VectorSearchIndex (fields = ["title_embedded" ])]
8276
8377 errors = checks .run_checks (app_configs = self .apps .get_app_configs (), databases = {"default" })
8478 self .assertEqual (
@@ -98,9 +92,7 @@ class Article(models.Model):
9892 title_embedded = ArrayField (models .CharField (), size = 30 )
9993
10094 class Meta :
101- indexes = [
102- VectorSearchIndex (fields = ["title_embedded" ]),
103- ]
95+ indexes = [VectorSearchIndex (fields = ["title_embedded" ])]
10496
10597 errors = checks .run_checks (app_configs = self .apps .get_app_configs (), databases = {"default" })
10698 self .assertEqual (
@@ -203,7 +195,7 @@ class Meta:
203195 VectorSearchIndex (
204196 fields = ["vector_data" , "vector_data" ],
205197 similarities = "dotProduct" ,
206- ),
198+ )
207199 ]
208200
209201 errors = checks .run_checks (app_configs = self .apps .get_app_configs (), databases = {"default" })
@@ -227,9 +219,7 @@ class Article(models.Model):
227219 vector_data = ArrayField (models .DecimalField (), size = 10 )
228220
229221 class Meta :
230- indexes = [
231- VectorSearchIndex (fields = ["vector_data" ]),
232- ]
222+ indexes = [VectorSearchIndex (fields = ["vector_data" ])]
233223
234224 errors = checks .run_checks (app_configs = self .apps .get_app_configs (), databases = {"default" })
235225 self .assertEqual (errors , [])
0 commit comments