MCPcopy Create free account
hub / github.com/easy-graph/Easy-Graph / add_slices

Method add_slices

easygraph/readwrite/gexf.py:575–583  ·  view source on GitHub ↗
(self, node_or_edge_element, node_or_edge_data)

Source from the content-addressed store, hash-verified

573 return node_data
574
575 def add_slices(self, node_or_edge_element, node_or_edge_data):
576 slices = node_or_edge_data.pop("slices", False)
577 if slices:
578 slices_element = Element("slices")
579 for start, end in slices:
580 e = Element("slice", start=str(start), end=str(end))
581 slices_element.append(e)
582 node_or_edge_element.append(slices_element)
583 return node_or_edge_data
584
585 def add_spells(self, node_or_edge_element, node_or_edge_data):
586 spells = node_or_edge_data.pop("spells", False)

Callers 2

add_nodesMethod · 0.95
add_edgesMethod · 0.95

Calls 2

popMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected