MCPcopy Create free account
hub / github.com/FastMAS/KVCOMM / add_node

Method add_node

KVCOMM/graph/graph.py:128–134  ·  view source on GitHub ↗
(self, node: Node)

Source from the content-addressed store, hash-verified

126 f"{[node.id for node in self.nodes.values()]}")
127
128 def add_node(self, node: Node):
129 node_id = node.id if node.id is not None else shortuuid.ShortUUID().random(length=4)
130 while node_id in self.nodes:
131 node_id = shortuuid.ShortUUID().random(length=4)
132 node.id = node_id
133 self.nodes[node_id] = node
134 return node
135
136 def init_nodes(self):
137 """

Callers 1

init_nodesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected