Label Actions (autotransform.step.action.labels)

All Actions associated with a Change’s labels.

class autotransform.step.action.labels.AddLabelsAction(*, labels: List[str])

Bases: Action

Adds labels to an existing Change.

labels

The list of labels to add.

Type

List[str]

name

The name of the component.

Type

ClassVar[ActionName]

labels: List[str]
classmethod labels_must_be_non_empty(v: List[str]) List[str]

Validates the labels are not empty.

Parameters

v (List[str]) – The labels to add to the Change.

Raises

ValueError – Raises an error when the labels are empty.

Returns

The unmodified labels to add.

Return type

List[str]

name: ClassVar[ActionName] = 'add_labels'
class autotransform.step.action.labels.RemoveLabelAction(*, label: str)

Bases: Action

Removes a label from an existing Change.

label

The label to remove.

Type

str

name

The name of the component.

Type

ClassVar[ActionName]

label: str
classmethod label_must_be_non_empty(v: str) str

Validates the label is not empty.

Parameters

v (str) – The label to remove.

Raises

ValueError – Raises an error when the label is empty.

Returns

The unmodified label of the comment.

Return type

str

name: ClassVar[ActionName] = 'remove_label'