ValueCommitId

class dsviper.ValueCommitId(initial_value=None)

Bases: Value

A value of type commit_id.

Use the static factory method try_parse(…).

Or use Value.create(Type.COMMIT_ID [, initial_value]).

INVALID = 0000000000000000000000000000000000000000
static cast(value: Value | _OutputValues) → ValueCommitId

Return value as a commit_id, or raise if it is not one.

copy() → ValueCommitId

Return a deep copy.

description(*, namespace: NameSpace | None = None) → str

Return the value written out, then its type, as <value>:<type>.

namespace qualifies the type name; representation() gives the value alone.

encoded() → str

Return a Python str.

hash() → int

Return the hash value.

is_valid() → bool

Return True if the value is not INVALID.

representation() → str

Return the value written out: the commit id as a hex string.

static try_parse(string: str) → ValueCommitId | None

Return string parsed as a commit_id, or None if it does not parse.

type() → Type

Return the Type this value is an instance of.

type_code() → str

Return the code naming this kind of value, such as “int32”, “struct” or “vector”.