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

Function calls

__tests__/python-outside-bases.test.ts:213–218  ·  view source on GitHub ↗
(file: string, fn: string)

Source from the content-addressed store, hash-verified

211
212/** Qualified names of the methods `fn` in `file` calls. */
213const calls = (file: string, fn: string): string[] => {
214 const node = cg.getNodesInFile(file).find((n) => n.name === fn && n.kind === 'function')!;
215 expect(node, fn).toBeDefined();
216 return cg.getOutgoingEdges(node.id).filter((e) => e.kind === 'calls')
217 .map((e) => cg.getNode(e.target)!).filter((n) => n.kind === 'method').map((n) => n.qualifiedName);
218};
219
220/** `file:class` of what the class `name` in `file` extends. */
221const bases = (file: string, name: string): string[] => {

Callers 1

Calls 4

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

Tested by

no test coverage detected