qudi.util.yaml.SafeConstructor
- class qudi.util.yaml.SafeConstructor(preserve_quotes: bool | None = None, loader: Any = None)[source]
Bases:
ruamel.yaml.constructor.SafeConstructorCustom YAML constructor for qudi config files
- __init__(preserve_quotes: bool | None = None, loader: Any = None) None
Methods
__init__([preserve_quotes, loader])add_constructor(tag, constructor)add_default_constructor(tag[, method, tag_base])add_multi_constructor(tag_prefix, ...)check_mapping_key(node, key_node, mapping, ...)return True if key is unique
check_set_key(node, key_node, setting, key)construct_complex(node)The complex constructor.
construct_document(node)construct_enum(node)The Enum constructor.
construct_extndarray(node)The constructor for a numpy array that is saved in a separate file.
construct_flag(node)The Flag constructor.
construct_frozenset(node)The frozenset constructor.
construct_mapping(node[, deep])deep is True when creating an object/mapping recursively, in that case want the underlying elements available during construction
construct_ndarray(node)The constructor for a numpy array that is saved as binary string with ASCII-encoding
construct_non_recursive_object(node[, tag])construct_object(node[, deep])deep is True when creating an object/mapping recursively, in that case want the underlying elements available during construction
construct_pairs(node[, deep])construct_scalar(node)construct_sequence(node[, deep])deep is True when creating an object/mapping recursively, in that case want the underlying elements available during construction
construct_undefined(node)construct_yaml_binary(node)construct_yaml_bool(node)construct_yaml_float(node)construct_yaml_int(node)construct_yaml_map(node)construct_yaml_null(node)construct_yaml_object(node, cls)construct_yaml_omap(node)construct_yaml_pairs(node)construct_yaml_seq(node)construct_yaml_set(node)construct_yaml_str(node)construct_yaml_timestamp(node[, values])flatten_mapping(node)This implements the merge key feature http://yaml.org/type/merge.html by inserting keys from the merge dict/list of dicts if not yet available in this node
get_data()Attributes
- classmethod add_constructor(tag: Any, constructor: Any) Any
- classmethod add_default_constructor(tag: str, method: Any = None, tag_base: str = 'tag:yaml.org,2002:') None
- classmethod add_multi_constructor(tag_prefix: Any, multi_constructor: Any) None
- bool_values = {'false': False, 'n': False, 'no': False, 'off': False, 'on': True, 'true': True, 'y': True, 'yes': True}
- check_data() Any
- check_mapping_key(node: Any, key_node: Any, mapping: Any, key: Any, value: Any) bool
return True if key is unique
- check_set_key(node: Any, key_node: Any, setting: Any, key: Any) None
- property composer: Any
!! processed by numpydoc !!
- construct_document(node: Any) Any
- construct_extndarray(node)[source]
The constructor for a numpy array that is saved in a separate file.
- construct_mapping(node: Any, deep: bool = False) Any[source]
deep is True when creating an object/mapping recursively, in that case want the underlying elements available during construction
- construct_ndarray(node)[source]
The constructor for a numpy array that is saved as binary string with ASCII-encoding
- construct_non_recursive_object(node: Any, tag: str | None = None) Any
- construct_object(node: Any, deep: bool = False) Any
deep is True when creating an object/mapping recursively, in that case want the underlying elements available during construction
- construct_pairs(node: Any, deep: bool = False) Any
- construct_sequence(node: Any, deep: bool = False) Any
deep is True when creating an object/mapping recursively, in that case want the underlying elements available during construction
- constructed_objects: Dict[Any, Any]
- flatten_mapping(node: Any) Any[source]
This implements the merge key feature http://yaml.org/type/merge.html by inserting keys from the merge dict/list of dicts if not yet available in this node
- get_data() Any
- get_single_data() Any
- inf_value = inf
- nan_value = nan
- recursive_objects: Dict[Any, Any]
- property resolver: Any
!! processed by numpydoc !!
- property scanner: Any
!! processed by numpydoc !!
- state_generators: List[Any]
- timestamp_regexp = <ruamel.yaml.util.LazyEval object>
- yaml_constructors: Dict[Any, Any] = {'tag:yaml.org,2002:binary': <function SafeConstructor.construct_yaml_binary>, 'tag:yaml.org,2002:bool': <function SafeConstructor.construct_yaml_bool>, 'tag:yaml.org,2002:complex': <function SafeConstructor.construct_complex>, 'tag:yaml.org,2002:enum': <function SafeConstructor.construct_enum>, 'tag:yaml.org,2002:extndarray': <function SafeConstructor.construct_extndarray>, 'tag:yaml.org,2002:flag': <function SafeConstructor.construct_flag>, 'tag:yaml.org,2002:float': <function SafeConstructor.construct_yaml_float>, 'tag:yaml.org,2002:frozenset': <function SafeConstructor.construct_frozenset>, 'tag:yaml.org,2002:int': <function SafeConstructor.construct_yaml_int>, 'tag:yaml.org,2002:map': <function SafeConstructor.construct_yaml_map>, 'tag:yaml.org,2002:ndarray': <function SafeConstructor.construct_ndarray>, 'tag:yaml.org,2002:null': <function SafeConstructor.construct_yaml_null>, 'tag:yaml.org,2002:omap': <function SafeConstructor.construct_yaml_omap>, 'tag:yaml.org,2002:pairs': <function SafeConstructor.construct_yaml_pairs>, 'tag:yaml.org,2002:seq': <function SafeConstructor.construct_yaml_seq>, 'tag:yaml.org,2002:set': <function SafeConstructor.construct_yaml_set>, 'tag:yaml.org,2002:str': <function SafeConstructor.construct_yaml_str>, 'tag:yaml.org,2002:timestamp': <function SafeConstructor.construct_yaml_timestamp>, None: <function SafeConstructor.construct_undefined>}
- yaml_multi_constructors: Dict[Any, Any] = {}