MCPcopy Create free account
hub / github.com/ActiveState/code / validate

Method validate

recipes/Python/578138_gprof2dotpy/recipe-578138.py:271–279  ·  view source on GitHub ↗

Validate the edges.

(self)

Source from the content-addressed store, hash-verified

269 self.cycles.append(cycle)
270
271 def validate(self):
272 """Validate the edges."""
273
274 for function in self.functions.values():
275 for callee_id in list(function.calls.keys()):
276 assert function.calls[callee_id].callee_id == callee_id
277 if callee_id not in self.functions:
278 sys.stderr.write('warning: call to undefined function %s from function %s\n' % (str(callee_id), function.name))
279 del function.calls[callee_id]
280
281 def find_cycles(self):
282 """Find cycles using Tarjan's strongly connected components algorithm."""

Callers 10

parseMethod · 0.95
parseMethod · 0.95
parseMethod · 0.95
build_profileMethod · 0.95
parseMethod · 0.95
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45

Calls 5

listClass · 0.85
strFunction · 0.85
valuesMethod · 0.45
keysMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected