From 4c501f805a8bbb9181061c4ad342f7a6a4af6390 Mon Sep 17 00:00:00 2001 From: "changjun.zhu" Date: Tue, 21 Dec 2021 19:21:48 +0800 Subject: [PATCH] feat(client): add deleteJob to squashAndMerge PR Closed: https://github.com/Graviti-AI/tensorbay-python-sdk/pull/1175 --- tensorbay/client/version.py | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/tensorbay/client/version.py b/tensorbay/client/version.py index 37ef9f451..e9d0e1618 100644 --- a/tensorbay/client/version.py +++ b/tensorbay/client/version.py @@ -638,15 +638,6 @@ def _get_job(self, job_id: str) -> Dict[str, Any]: "GET", f"jobs/{job_id}", self._dataset_id ).json() - def _delete_job(self, job_id: str) -> None: - """Delete a :class:`Job`. - - Arguments: - job_id: The Job id. - - """ - self._client.open_api_do("DELETE", f"jobs/{job_id}", self._dataset_id) - def _generate_jobs( self, job_type: str, @@ -668,6 +659,15 @@ def _generate_jobs( """ + def delete_job(self, job_id: str) -> None: + """Delete a :class:`Job`. + + Arguments: + job_id: The Job id. + + """ + self._client.open_api_do("DELETE", f"jobs/{job_id}", self._dataset_id) + class SquashAndMerge(JobMixin): """This class defines :class:`SquashAndMerge`. @@ -772,11 +772,3 @@ def list_jobs(self, status: Optional[str] = None) -> PagingList[SquashAndMergeJo The PagingList of SquashAndMergeJob. """ - - def delete_job(self, job_id: str) -> None: - """Delete a :class:`SquashAndMergeJob`. - - Arguments: - job_id: The SquashAndMergeJob id. - - """