tensorbay.client.status
Class Status.
- class tensorbay.client.status.Status(branch_name: Optional[str] = None, *, draft_number: Optional[int] = None, commit_id: Optional[str] = None)[source]
Bases:
object
This class defines the basic concept of the status.
- Parameters
branch_name – The branch name.
draft_number – The draft number (if the status is draft).
commit_id – The commit ID (if the status is commit).
- property is_draft: bool
Return whether the status is draft, True for draft, False for commit.
- Returns
whether the status is draft, True for draft, False for commit.
- property draft_number: Optional[int]
Return the draft number.
- Returns
The draft number.
- property commit_id: Optional[str]
Return the commit ID.
- Returns
The commit ID.
- get_status_info() Dict[str, Any] [source]
Get the dict containing the draft number or commit ID.
- Returns
A dict containing the draft number or commit ID.
- check_authority_for_commit() None [source]
Check whether the status is a legal commit.
- Raises
StatusError – When the status is not a legal commit.
- check_authority_for_draft() None [source]
Check whether the status is a legal draft.
- Raises
StatusError – When the status is not a legal draft.