craft_parts.state_manager.overlay_state module¶
State definitions for the overlay step.
- class craft_parts.state_manager.overlay_state.OverlayState(**data)[source]¶
Bases:
StepStateContext information for the overlay step.
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function StepState.<lambda>>, 'extra': 'ignore', 'frozen': True, 'populate_by_name': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- project_options_of_interest(project_options)[source]¶
Return relevant project options concerning this step.
- Parameters:
project_options (
ProjectOptions) – AProjectOptionsinstance.- Return type:
dict[str,Any]- Returns:
A dictionary containing project options of interest.
- properties_of_interest(part_properties, *, extra_properties=None)[source]¶
Return relevant properties concerning this step.
- Parameters:
part_properties (
dict[str,Any]) – A dictionary containing all part properties.extra_properties (
list[str] |None) – Additional relevant properties to return.
- Return type:
dict[str,Any]- Returns:
A dictionary containing properties of interest.
- classmethod unmarshal(data)[source]¶
Create and populate a new
OverlayStateobject from dictionary data.The unmarshal method validates entries in the input dictionary, populating the corresponding fields in the state object.
- Parameters:
data (
dict[str,Any]) – The dictionary data to unmarshal.- Return type:
- Returns:
The newly created object.
- Raises:
TypeError – If data is not a dictionary.