|
lsst.pex.config g364dc83bf4+1d28dfd693
|
Public Member Functions | |
| __init__ (self, config, field) | |
| apply (self, *args, **kwargs) | |
| apply_with (self, selection, *args, **kwargs) | |
| __setattr__ (self, attr, value) | |
| Public Member Functions inherited from lsst.pex.config.configChoiceField.ConfigInstanceDict | |
| __init__ (self, Config config, ConfigChoiceField field) | |
| types (self) | |
| __contains__ (self, k) | |
| __len__ (self) | |
| __iter__ (self) | |
| __getitem__ (self, k, at=None, label="default") | |
| __setitem__ (self, k, value, at=None, label="assignment") | |
| __setattr__ (self, attr, value, at=None, label="assignment") | |
| freeze (self) | |
| __reduce__ (self) | |
Public Attributes | |
| registry = field.registry | |
| Public Attributes inherited from lsst.pex.config.configChoiceField.ConfigInstanceDict | |
| types | |
Protected Member Functions | |
| _getTarget (self) | |
| _getTargets (self) | |
| Protected Member Functions inherited from lsst.pex.config.configChoiceField.ConfigInstanceDict | |
| ConfigInstanceDict | _copy (self, Config config) |
| _setSelection (self, value, at=None, label="assignment") | |
| _getNames (self) | |
| _setNames (self, value) | |
| _delNames (self) | |
| _getName (self) | |
| _setName (self, value) | |
| _delName (self) | |
| _getActive (self) | |
| _rename (self, fullname) | |
Properties | |
| target = property(_getTarget) | |
| targets = property(_getTargets) | |
| Properties inherited from lsst.pex.config.configChoiceField.ConfigInstanceDict | |
| names = property(_getNames, _setNames, _delNames) | |
| name = property(_getName, _setName, _delName) | |
| active = property(_getActive) | |
Additional Inherited Members | |
| Protected Attributes inherited from lsst.pex.config.configChoiceField.ConfigInstanceDict | |
| dict | _dict = {} |
| _selection = None | |
| _config = config | |
| _field = field | |
| _history = config._history.setdefault(field.name, []) | |
| _typemap = None | |
Dictionary of instantiated configs, used to populate a `RegistryField`.
Parameters
----------
config : `lsst.pex.config.Config`
Configuration instance.
field : `RegistryField`
Configuration field.
| lsst.pex.config.registry.RegistryInstanceDict.apply | ( | self, | |
| * | args, | ||
| ** | kwargs ) |
Call the active target(s) with the active config as a keyword arg.
Parameters
----------
*args, **kwargs : `~typing.Any
Additional arguments will be passed on to the configurable
target(s).
Returns
-------
result
If this is a single-selection field, the return value from calling
the target. If this is a multi-selection field, a list thereof.
| lsst.pex.config.registry.RegistryInstanceDict.apply_with | ( | self, | |
| selection, | |||
| * | args, | ||
| ** | kwargs ) |
Call named target(s) with the corresponding config as a keyword
arg.
Parameters
----------
selection : `str` or `~collections.abc.Iterable` [ `str` ]
Name or names of targets, depending on whether ``multi=True``.
*args, **kwargs
Additional arguments will be passed on to the configurable
target(s).
Returns
-------
result
If this is a single-selection field, the return value from calling
the target. If this is a multi-selection field, a list thereof.
Notes
-----
This method ignores the current selection in the ``name`` or ``names``
attribute, which is usually not what you want. This method is most
useful in ``on_none`` callbacks provided at field construction, which
allow a context-dependent default to be used when no selection is
configured.