Appends attribute data to edges or nodes, and stores type information to be added later. See add_graph_element.
(self, scope, xml_obj, data, default)
| 572 | return data_element |
| 573 | |
| 574 | def add_attributes(self, scope, xml_obj, data, default): |
| 575 | """Appends attribute data to edges or nodes, and stores type information |
| 576 | to be added later. See add_graph_element. |
| 577 | """ |
| 578 | for k, v in data.items(): |
| 579 | self.attribute_types[(str(k), scope)].add(type(v)) |
| 580 | self.attributes[xml_obj].append([k, v, scope, default.get(k)]) |
| 581 | |
| 582 | def add_nodes(self, G, graph_element): |
| 583 | default = G.graph.get("node_default", {}) |
no test coverage detected