Skip to content

Commit 84de735

Browse files
committed
@GitHK done_done -> done
1 parent 100aaae commit 84de735

File tree

1 file changed

+4
-5
lines changed
  • packages/models-library/src/models_library/api_schemas_rpc_long_running_tasks

1 file changed

+4
-5
lines changed

packages/models-library/src/models_library/api_schemas_rpc_long_running_tasks/tasks.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@ class TaskRpcStatus(BaseModel):
1818
@model_validator(mode="after")
1919
def _check_consistency(self) -> Self:
2020
progress_done = self.task_progress == 1.0
21-
done_done = self.done == True
21+
done = self.done
2222
stopped_done = self.stopped is not None
2323

24-
if (progress_done != done_done) or (done_done != stopped_done):
25-
raise ValueError(
26-
f"Inconsistent data: {self.task_progress=}, {self.done=}, {self.stopped=}"
27-
)
24+
if (progress_done != done) or (done != stopped_done):
25+
msg = f"Inconsistent data: {self.task_progress=}, {self.done=}, {self.stopped=}"
26+
raise ValueError(msg)
2827
return self
2928

3029

0 commit comments

Comments
 (0)