lsst.pex.config ge80df9fc40+296e528a3c
 
Loading...
Searching...
No Matches
lsst.pex.config.configDictField.ConfigDict Class Reference
Inheritance diagram for lsst.pex.config.configDictField.ConfigDict:
lsst.pex.config.dictField.Dict lsst.pex.config.config.Config lsst.pex.config.config.ConfigMeta

Public Member Functions

 __init__ (self, Config config, ConfigDictField field, Mapping[str, Config]|None value, *, list[StackFrame]|None at, str label, bool setHistory=True)
 
 __setitem__ (self, k, x, at=None, label="setitem", setHistory=True)
 
 __delitem__ (self, k, at=None, label="delitem")
 
- Public Member Functions inherited from lsst.pex.config.dictField.Dict
 __init__ (self, Config config, DictField field, Mapping[KeyTypeVar, ItemTypeVar] value, *, list[StackFrame]|None at, str label, bool setHistory=True)
 
ItemTypeVar __getitem__ (self, KeyTypeVar k)
 
int __len__ (self)
 
Iterator[KeyTypeVar] __iter__ (self)
 
bool __contains__ (self, Any k)
 
None __setitem__ (self, KeyTypeVar k, ItemTypeVar x, Any at=None, str label="setitem", bool setHistory=True)
 
None __delitem__ (self, KeyTypeVar k, Any at=None, str label="delitem", bool setHistory=True)
 
 __repr__ (self)
 
 __str__ (self)
 
 __setattr__ (self, attr, value, at=None, label="assignment")
 
 __reduce__ (self)
 
- Public Member Functions inherited from lsst.pex.config.config.Config
 __iter__ (self)
 
 keys (self)
 
 values (self)
 
 items (self)
 
 __contains__ (self, name)
 
 __new__ (cls, *args, **kw)
 
Config copy (self)
 
 __reduce__ (self)
 
 setDefaults (self)
 
 update (self, **kw)
 
 load (self, filename, root="config")
 
 loadFromStream (self, stream, root="config", filename=None, extraLocals=None)
 
 loadFromString (self, code, root="config", filename=None, extraLocals=None)
 
 save (self, filename, root="config")
 
 saveToString (self, skipImports=False)
 
 saveToStream (self, outfile, root="config", skipImports=False)
 
 freeze (self)
 
 toDict (self)
 
 names (self)
 
 validate (self)
 
 formatHistory (self, name, **kwargs)
 
 __setattr__ (self, attr, value, at=None, label="assignment")
 
 __delattr__ (self, attr, at=None, label="deletion")
 
 __eq__ (self, other)
 
 __ne__ (self, other)
 
 __str__ (self)
 
 __repr__ (self)
 
 compare (self, other, shortcut=True, rtol=1e-8, atol=1e-8, output=None)
 
 __init_subclass__ (cls, **kwargs)
 
- Public Member Functions inherited from lsst.pex.config.config.ConfigMeta
 __init__ (cls, name, bases, dict_)
 
 __setattr__ (cls, name, value)
 

Protected Member Functions

Dict _copy (self, Config config)
 
- Protected Member Functions inherited from lsst.pex.config.dictField.Dict
Config _config (self)
 
- Protected Member Functions inherited from lsst.pex.config.config.Config
tuple[ResourcePath|None, str] _filename_to_resource (self, ResourcePathExpression|None filename=None)
 
 _loadFromString (self, code, root="config", filename=None, extraLocals=None)
 
 _save (self, outfile)
 
 _collectImports (self)
 
 _rename (self, name)
 
 _fromPython (cls, config_py)
 

Additional Inherited Members

- Protected Attributes inherited from lsst.pex.config.dictField.Dict
 _field = field
 
 _config_ = weakref.ref(config)
 
dict _dict = {}
 
Config _history = self._config._history.setdefault(self._field.name, [])
 
 _config
 
- Protected Attributes inherited from lsst.pex.config.config.Config
bool _frozen = True
 
 _name = name
 
- Protected Attributes inherited from lsst.pex.config.config.ConfigMeta
dict _fields = {}
 
 _source = getStackFrame()
 
- Static Protected Attributes inherited from lsst.pex.config.config.Config
dict _storage [str, Any]
 
dict _history [str, list[Any]]
 
set _imports [Any]
 
- Properties inherited from lsst.pex.config.dictField.Dict
 history = property(lambda x: x._history)
 
- Properties inherited from lsst.pex.config.config.Config
 history = property(lambda x: x._history)
 

Detailed Description

Internal representation of a dictionary of configuration classes.

Much like `Dict`, `ConfigDict` is a custom `MutableMapper` which tracks
the history of changes to any of its items.

Parameters
----------
config : `~lsst.pex.config.Config`
    Config to use.
field : `~lsst.pex.config.ConfigDictField`
    Field to use.
value : `~typing.Any`
    Value to store in dict.
at : `list` of `~lsst.pex.config.callStack.StackFrame` or `None`, optional
    Stack frame for history recording. Will be calculated if `None`.
label : `str`, optional
    Label to use for history recording.
setHistory : `bool`, optional
    Whether to append to the history record.

Member Function Documentation

◆ _copy()

Dict lsst.pex.config.configDictField.ConfigDict._copy ( self,
Config config )
protected

Reimplemented from lsst.pex.config.dictField.Dict.


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