lsst.pex.config  13.0-3-g520d906+6
Public Member Functions | Public Attributes | List of all members
lsst.pex.config.listField.ListField Class Reference
Inheritance diagram for lsst.pex.config.listField.ListField:
lsst.pex.config.config.Field

Public Member Functions

def __init__ (self, doc, dtype, default=None, optional=False, listCheck=None, itemCheck=None, length=None, minLength=None, maxLength=None)
 
def validate (self, instance)
 
def __set__ (self, instance, value, at=None, label="assignment")
 
def toDict (self, instance)
 
- Public Member Functions inherited from lsst.pex.config.config.Field
def __init__ (self, doc, dtype, default=None, check=None, optional=False)
 
def rename (self, instance)
 
def validate (self, instance)
 
def freeze (self, instance)
 
def save (self, outfile, instance)
 
def toDict (self, instance)
 
def __get__ (self, instance, owner=None, at=None, label="default")
 
def __set__ (self, instance, value, at=None, label='assignment')
 
def __delete__ (self, instance, at=None, label='deletion')
 

Public Attributes

 listCheck
 
 itemCheck
 
 itemtype
 
 length
 
 minLength
 
 maxLength
 
- Public Attributes inherited from lsst.pex.config.config.Field
 dtype
 
 doc
 
 default
 
 check
 
 optional
 
 source
 

Additional Inherited Members

- Static Public Attributes inherited from lsst.pex.config.config.Field
 supportedTypes = set((str, unicode, basestring, oldStringType, bool, float, int, complex))
 

Detailed Description

Defines a field which is a container of values of type dtype

If length is not None, then instances of this field must match this length
exactly.
If minLength is not None, then instances of the field must be no shorter
then minLength
If maxLength is not None, then instances of the field must be no longer
than maxLength

Additionally users can provide two check functions:
listCheck - used to validate the list as a whole, and
itemCheck - used to validate each item individually

Definition at line 155 of file listField.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.pex.config.listField.ListField.__init__ (   self,
  doc,
  dtype,
  default = None,
  optional = False,
  listCheck = None,
  itemCheck = None,
  length = None,
  minLength = None,
  maxLength = None 
)

Definition at line 172 of file listField.py.

Member Function Documentation

◆ __set__()

def lsst.pex.config.listField.ListField.__set__ (   self,
  instance,
  value,
  at = None,
  label = "assignment" 
)

Definition at line 226 of file listField.py.

◆ toDict()

def lsst.pex.config.listField.ListField.toDict (   self,
  instance 
)

Definition at line 241 of file listField.py.

◆ validate()

def lsst.pex.config.listField.ListField.validate (   self,
  instance 
)
ListField validation ensures that non-optional fields are not None,
    and that non-None values comply with length requirements and
    that the list passes listCheck if supplied by the user.
Individual Item checks are applied at set time and are not re-checked.

Definition at line 202 of file listField.py.

Member Data Documentation

◆ itemCheck

lsst.pex.config.listField.ListField.itemCheck

Definition at line 196 of file listField.py.

◆ itemtype

lsst.pex.config.listField.ListField.itemtype

Definition at line 197 of file listField.py.

◆ length

lsst.pex.config.listField.ListField.length

Definition at line 198 of file listField.py.

◆ listCheck

lsst.pex.config.listField.ListField.listCheck

Definition at line 195 of file listField.py.

◆ maxLength

lsst.pex.config.listField.ListField.maxLength

Definition at line 200 of file listField.py.

◆ minLength

lsst.pex.config.listField.ListField.minLength

Definition at line 199 of file listField.py.


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