MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / calls

Function calls

__tests__/python-pep695-bases.test.ts:123–128  ·  view source on GitHub ↗
(fn: string)

Source from the content-addressed store, hash-verified

121
122/** Qualified names of the methods `fn` calls. */
123const calls = (fn: string): string[] => {
124 const node = cg.getNodesInFile('app/m.py').find((n) => n.name === fn && n.kind === 'function')!;
125 expect(node, fn).toBeDefined();
126 return cg.getOutgoingEdges(node.id).filter((e) => e.kind === 'calls')
127 .map((e) => cg.getNode(e.target)!).filter((n) => n.kind === 'method').map((n) => n.qualifiedName);
128};
129
130// Base and Other both declare `run`, and the globals are not named after their
131// classes, so only the class's own bases can pick one.

Callers 1

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesInFileMethod · 0.65
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected