ConfigurableActionStruct

class lsst.pex.config.configurableActions.ConfigurableActionStruct(config: Config, field: ConfigurableActionStructField, value: Mapping[str, ConfigurableAction], at: Any, label: str)

Bases: Generic[ActionTypeVar]

A ConfigurableActionStruct is the storage backend class that supports the ConfigurableActionStructField. This class should not be created directly.

This class allows managing a collection of ConfigurableAction with a struct like interface, that is to say in an attribute like notation.

Attributes can be dynamically added or removed as such:

ConfigurableActionStructInstance.variable1 = a_configurable_action
del ConfigurableActionStructInstance.variable1

Each action is then available to be individually configured as a normal lsst.pex.config.Config object.

ConfigurableActionStruct supports two special convenience attributes.

The first is update. You may assign a dict of ConfigurableAction or a ConfigurableActionStruct to this attribute which will update the ConfigurableActionStruct on which the attribute is invoked such that it will be updated to contain the entries specified by the structure on the right hand side of the equals sign.

The second convenience attribute is named remove. You may assign an iterable of strings which correspond to attribute names on the ConfigurableActionStruct. All of the corresponding attributes will then be removed. If any attribute does not exist, an AttributeError will be raised. Any attributes in the Iterable prior to the name which raises will have been removed from the ConfigurableActionStruct

Attributes Summary

fieldNames

history

remove

update

Methods Summary

items()

Attributes Documentation

fieldNames
history
remove = None
update = None

Methods Documentation

items() Iterable[tuple[str, ActionTypeVar]]