Beispiel #1
0
 def dict_constructor(loader: yaml.Loader,
                      node: yaml.nodes.Node) -> mapping_dict:
     mapping = mapping_dict(loader.construct_pairs(node))
     mapping._start_line = node._start_line
     return mapping
Beispiel #2
0
 def _make_ordered_dict(loader: yaml.Loader,
                        node: yaml.Node) -> OrderedDict:
     loader.flatten_mapping(node)
     return OrderedDict(loader.construct_pairs(node))
 def dict_constructor(loader: yaml.Loader, node: yaml.MappingNode):
     return OrderedDict(loader.construct_pairs(node))
Beispiel #4
0
 def construct_mapping(loader: yaml.Loader, node: yaml.Node):
     loader.flatten_mapping(node)
     return OrderedDict(loader.construct_pairs(node))
Beispiel #5
0
 def construct_mapping(loader: yaml.Loader, node):
     loader.flatten_mapping(node)
     return object_pairs_hook(loader.construct_pairs(node))
Beispiel #6
0
def _construct_attr_dict(loader: yaml.Loader, node):
    loader.flatten_mapping(node)
    return AttrDict(loader.construct_pairs(node, deep=True))