mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-05 17:30:48 +08:00
added parens for readability
This commit is contained in:
@@ -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