Skip to content

Commit

Permalink
feat(client): add deleteJob to squashAndMerge
Browse files Browse the repository at this point in the history
  • Loading branch information
graczhual committed Dec 22, 2021
1 parent b0e50bc commit 88fa38e
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions tensorbay/client/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 _list_jobs(
self,
job_type: str,
Expand All @@ -672,6 +663,15 @@ def _list_jobs(
response = self._client.open_api_do("GET", "jobs", self._dataset_id, params=params)
return response.json() # type: ignore[no-any-return]

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`.
Expand Down Expand Up @@ -776,11 +776,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.
"""

0 comments on commit 88fa38e

Please sign in to comment.