MCPcopy Create free account
hub / github.com/ablab/spades / construct_mapping

Method construct_mapping

ext/src/python_libs/pyyaml3/constructor.py:118–131  ·  view source on GitHub ↗
(self, node, deep=False)

Source from the content-addressed store, hash-verified

116 for child in node.value]
117
118 def construct_mapping(self, node, deep=False):
119 if not isinstance(node, MappingNode):
120 raise ConstructorError(None, None,
121 "expected a mapping node, but found %s" % node.id,
122 node.start_mark)
123 mapping = {}
124 for key_node, value_node in node.value:
125 key = self.construct_object(key_node, deep=deep)
126 if not isinstance(key, collections.abc.Hashable):
127 raise ConstructorError("while constructing a mapping", node.start_mark,
128 "found unhashable key", key_node.start_mark)
129 value = self.construct_object(value_node, deep=deep)
130 mapping[key] = value
131 return mapping
132
133 def construct_pairs(self, node, deep=False):
134 if not isinstance(node, MappingNode):

Callers 3

construct_mappingMethod · 0.45

Calls 2

construct_objectMethod · 0.95
ConstructorErrorClass · 0.85

Tested by

no test coverage detected