MCPcopy Create free account
hub / github.com/CyberPoint/libpgm / remove_edge

Function remove_edge

utils/bntextutils.py:48–55  ·  view source on GitHub ↗
(path, edge)

Source from the content-addressed store, hash-verified

46 json.dump(j, f, indent=2)
47
48def remove_edge(path, edge):
49 _validate(path)
50 with open(path, "r") as f:
51 j = json.load(f)
52 assert edge in j["E"], "edge not present"
53 j["E"].remove(edge)
54 with open(path, "w") as f:
55 json.dump(j, f, indent=2)
56
57def add_node(path, node):
58 _validate(path)

Callers

nothing calls this directly

Calls 2

_validateFunction · 0.85
loadMethod · 0.45

Tested by

no test coverage detected