added parens for readability

This commit is contained in:
Yannic Kilcher
2022-12-25 19:00:13 +01:00
parent d6ab6519bb
commit 55d003adbe
@@ -249,6 +249,6 @@ class TextLabels(BaseModel):
@pydantic.validator("labels")
def check_label_values(cls, v):
for key, value in v.items():
if not 0 <= value <= 1:
if not (0 <= value <= 1):
raise ValueError(f"Label values must be between 0 and 1, got {value} for {key}.")
return v