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

Function calls

__tests__/python-multiline-bases.test.ts:161–166  ·  view source on GitHub ↗
(fn: string)

Source from the content-addressed store, hash-verified

159
160/** Qualified names of the methods `fn` calls. */
161const calls = (fn: string): string[] => {
162 const node = cg.getNodesInFile('app/m.py').find((n) => n.name === fn && n.kind === 'function')!;
163 expect(node, fn).toBeDefined();
164 return cg.getOutgoingEdges(node.id).filter((e) => e.kind === 'calls')
165 .map((e) => cg.getNode(e.target)!).filter((n) => n.kind === 'method').map((n) => n.qualifiedName);
166};
167
168describe('a Python base list wrapped over several lines', () => {
169 // Base and Other both declare `run`, and the globals are not named after

Callers 1

Calls 4

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

Tested by

no test coverage detected