LSST Applications g0265f82a02+093ff98f47,g02d81e74bb+10352d6f39,g1f3e9fa97e+40b0fc677d,g2079a07aa2+14824f138e,g2bbee38e9b+093ff98f47,g337abbeb29+093ff98f47,g3ddfee87b4+064c02c7ee,g487adcacf7+7e842ebf4b,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g568d43a26c+1d7ac31cb0,g591dd9f2cf+fb1f69e2ea,g858d7b2824+10352d6f39,g8a8a8dda67+a6fc98d2e7,g8cdfe0ae6a+66d966b544,g99cad8db69+7ce8a7c20a,g9ddcbc5298+d4bad12328,ga1e77700b3+246acaaf9c,ga2e4dd1c03+064c02c7ee,ga8c6da7877+04f6ba86dc,gae46bcf261+093ff98f47,gb0e22166c9+3863383f4c,gba4ed39666+9664299f35,gbb8dafda3b+db40f59a7d,gbeb006f7da+e6a448e96d,gbf5cecdb8a+10352d6f39,gc0f3af6251+10a3fd39cd,gc120e1dc64+5839e50a77,gc28159a63d+093ff98f47,gcf0d15dbbd+064c02c7ee,gd2a12a3803+0c2c227a2b,gdaeeff99f8+a38ce5ea23,ge79ae78c31+093ff98f47,gee10cc3b42+a6fc98d2e7,gf1cff7945b+10352d6f39,w.2024.15
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lsst.pex.config.configurableActions._configurableActionStructField.ConfigurableActionStructRemover Class Reference

Public Member Functions

None __set__ (self, ConfigurableActionStruct instance, str|Iterable[str] value)
 
None __get__ (self, instance, objtype=None)
 

Detailed Description

Abstract the logic of removing an iterable of action names from a
`ConfigurableActionStruct` at one time using attribute assignment.

This is useful in the context of setting configuration through pipelines
or on the command line.

Raises
------
AttributeError
    Raised if an attribute specified for removal does not exist in the
    ConfigurableActionStruct

Definition at line 68 of file _configurableActionStructField.py.

Member Function Documentation

◆ __get__()

None lsst.pex.config.configurableActions._configurableActionStructField.ConfigurableActionStructRemover.__get__ ( self,
instance,
objtype = None )

Definition at line 91 of file _configurableActionStructField.py.

91 def __get__(self, instance, objtype=None) -> None:
92 # This descriptor does not support fetching any value
93 return None
94
95

◆ __set__()

None lsst.pex.config.configurableActions._configurableActionStructField.ConfigurableActionStructRemover.__set__ ( self,
ConfigurableActionStruct instance,
str | Iterable[str] value )

Definition at line 82 of file _configurableActionStructField.py.

82 def __set__(self, instance: ConfigurableActionStruct, value: str | Iterable[str]) -> None:
83 # strings are iterable, but not in the way that is intended. If a
84 # single name is specified, turn it into a tuple before attempting
85 # to remove the attribute
86 if isinstance(value, str):
87 value = (value,)
88 for name in value:
89 delattr(instance, name)
90

The documentation for this class was generated from the following file: