ChangeStateCondition (autotransform.step.condition.state)

The implementation for the ChangeStateCondition.

class autotransform.step.condition.state.ChangeStateCondition(*, comparison: ComparisonType, value: ChangeState | List[ChangeState])

Bases: ComparisonCondition[ChangeState]

A condition which checks the ChangeState against the state supplied using the supplied comparison.

comparison

The type of comparison to perform.

Type:

ComparisonType

value

The state(s) to compare against.

Type:

Union[ChangeState, List[ChangeState]]

name

The name of the Component.

Type:

ClassVar[ConditionName]

comparison: ComparisonType
get_val_from_change(change: Change) ChangeState

Gets the state from the Change.

Parameters:

change (Change) – The Change the Condition is checking.

Returns:

The state of the Change.

Return type:

ChangeState

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: ClassVar[ConditionName] = 'change_state'
value: ChangeState | List[ChangeState]
class autotransform.step.condition.state.MergeableStateCondition(*, comparison: ComparisonType, value: str | List[str])

Bases: ComparisonCondition[str]

A condition which checks the mergeable state against the state supplied using the supplied comparison.

comparison

The type of comparison to perform.

Type:

ComparisonType

value

The state(s) to compare against.

Type:

Union[str, List[str]]

name

The name of the Component.

Type:

ClassVar[ConditionName]

comparison: ComparisonType
get_val_from_change(change: Change) str

Gets the mergeable state from the Change.

Parameters:

change (Change) – The Change the Condition is checking.

Returns:

The mergeable state of the Change.

Return type:

str

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: ClassVar[ConditionName] = 'mergeable_state'
value: str | List[str]
class autotransform.step.condition.state.ReviewStateCondition(*, comparison: ComparisonType, value: ReviewState | List[ReviewState])

Bases: ComparisonCondition[ReviewState]

A condition which checks the ReviewState against the state supplied using the supplied comparison.

comparison

The type of comparison to perform.

Type:

ComparisonType

value

The state(s) to compare against.

Type:

Union[ReviewState, List[ReviewState]]

name

The name of the Component.

Type:

ClassVar[ConditionName]

comparison: ComparisonType
get_val_from_change(change: Change) ReviewState

Gets the review state from the Change.

Parameters:

change (Change) – The Change the Condition is checking.

Returns:

The review state of the Change.

Return type:

ReviewState

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: ClassVar[ConditionName] = 'review_state'
value: ReviewState | List[ReviewState]
class autotransform.step.condition.state.TestStateCondition(*, comparison: ComparisonType, value: TestState | List[TestState])

Bases: ComparisonCondition[TestState]

A condition which checks the TestState against the state supplied using the supplied comparison.

comparison

The type of comparison to perform.

Type:

ComparisonType

value

The state(s) to compare against.

Type:

Union[TestState, List[TestState]]

name

The name of the Component.

Type:

ClassVar[ConditionName]

comparison: ComparisonType
get_val_from_change(change: Change) TestState

Gets the state from the Change.

Parameters:

change (Change) – The Change the Condition is checking.

Returns:

The test state of the Change.

Return type:

TestState

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: ClassVar[ConditionName] = 'test_state'
value: TestState | List[TestState]