simpeg.utils.validate_list_of_types#
- simpeg.utils.validate_list_of_types(property_name, var, class_type, ensure_unique=False, min_n=0, max_n=None)[source]#
Validate list of instances of a certain class
- Parameters:
- property_name
str The name of the property being set
- var
objectoralistofobject A list of objects
- class_type
classortupleofclasstypes Class type(s) that are allowed in the list
- ensure_uniquebool,
optional Checks if all items in the var are unique items.
- min_n, max_n
int,optional Minimum and maximum supported list length. Defaults accept any length list.
- property_name
- Returns:
listReturns the list once validated