Skip to content

Commit c7dcf66

Browse files
committed
Fix pylint warning
1 parent 69f6be1 commit c7dcf66

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

meilisearch/models/index.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,29 @@ class Faceting(CamelBase):
3838

3939
@pydantic.field_validator("sort_facet_values_by") # type: ignore[attr-defined]
4040
@classmethod
41-
def validate_facet_order(cls, v: Optional[Dict[str, str]]) -> Optional[Dict[str, str]]:
42-
if not v: # pragma: no cover
41+
def validate_facet_order(cls, val: Optional[Dict[str, str]]) -> Optional[Dict[str, str]]:
42+
if not val: # pragma: no cover
4343
return None
4444

45-
for _, value in v.items():
45+
for _, value in val.items():
4646
if value not in ("alpha", "count"):
4747
raise ValueError('facet_order must be either "alpha" or "count"')
4848

49-
return v
49+
return val
5050

5151
else: # pragma: no cover
5252

5353
@pydantic.validator("sort_facet_values_by") # type: ignore[attr-defined]
5454
@classmethod
55-
def validate_facet_order(cls, v: Optional[Dict[str, str]]) -> Optional[Dict[str, str]]:
56-
if not v:
55+
def validate_facet_order(cls, val: Optional[Dict[str, str]]) -> Optional[Dict[str, str]]:
56+
if not val:
5757
return None
5858

59-
for _, value in v.items():
59+
for _, value in val.items():
6060
if value not in ("alpha", "count"):
6161
raise ValueError('facet_order must be either "alpha" or "count"')
6262

63-
return v
63+
return val
6464

6565

6666
class Pagination(CamelBase):

0 commit comments

Comments
 (0)