LSST Applications g05325017a3+be04ab5bc8,g2079a07aa2+3e9fd84d81,g20cdd03214+600de29eb2,g2305ad1205+5e1b0c67c7,g2bbee38e9b+69e041a28d,g337abbeb29+69e041a28d,g3a166c0a6a+69e041a28d,g4322eb9e3a+9670871960,g4e26c3aaff+9125fe5495,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+608c162c81,g5c3423f6d4+600de29eb2,g607f77f49a+600de29eb2,g69c4c69b53+69e041a28d,g858d7b2824+600de29eb2,g99cad8db69+a7f8c65a2d,g9ddcbc5298+9a081db1e4,ga1e77700b3+2cbb763275,ga8d6e2f9c9+7a336fa28a,gae0086650b+585e252eca,gb0e22166c9+0e73c8378f,gb7c702c636+aec2f3b930,gbb8dafda3b+7d1409958d,gc120e1dc64+acd995d0d8,gc28159a63d+69e041a28d,gcdd4ae20e8+5ef4c697da,gcf0d15dbbd+5ef4c697da,gd1535ee943+1ef0950dc9,gdaeeff99f8+f9a426f77a,gddc38dedce+585e252eca,ge79ae78c31+69e041a28d,gf905fbdb4b+471d9f2c03,gf907d663e3+01e3c6626b,gfbcc870c63+b310236976,w.2024.25
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lsst.pex.config.configurableActions._configurableActionStructField.ConfigurableActionStructUpdater Class Reference

Public Member Functions

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

Detailed Description

Abstract the logic of using a dictionary to update a
`ConfigurableActionStruct` through attribute assignment.

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

Definition at line 37 of file _configurableActionStructField.py.

Member Function Documentation

◆ __get__()

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

Definition at line 63 of file _configurableActionStructField.py.

63 def __get__(self, instance, objtype=None) -> None:
64 # This descriptor does not support fetching any value
65 return None
66
67

◆ __set__()

None lsst.pex.config.configurableActions._configurableActionStructField.ConfigurableActionStructUpdater.__set__ ( self,
ConfigurableActionStruct instance,
Mapping[str, ConfigurableAction] | ConfigurableActionStruct value )

Definition at line 45 of file _configurableActionStructField.py.

49 ) -> None:
50 if isinstance(value, Mapping):
51 pass
52 elif isinstance(value, ConfigurableActionStruct):
53 # If the update target is a ConfigurableActionStruct, get the
54 # internal dictionary
55 value = value._attrs
56 else:
57 raise ValueError(
58 "Can only update a ConfigurableActionStruct with an instance of such, or a " "mapping"
59 )
60 for name, action in value.items():
61 setattr(instance, name, action)
62

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