mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-10-04 12:10:16 +08:00
added parens for readability
This commit is contained in:
1 parent
d6ab6519bb
commit
55d003adbe
1 file changed
+1
-1
@@ -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
|
||||
Reference in new issue
Block a user