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

Function targetsFrom

__tests__/python-function-value-scope.test.ts:97–101  ·  view source on GitHub ↗
(file: string, qualifiedName?: string)

Source from the content-addressed store, hash-verified

95});
96
97const targetsFrom = (file: string, qualifiedName?: string) => {
98 const ids = cg.getNodesInFile(file).filter((n) => !qualifiedName || n.qualifiedName === qualifiedName).map((n) => n.id);
99 return cg.getOutgoingEdgesFrom(ids).filter((e) => e.kind === 'references' || e.kind === 'calls')
100 .map((e) => cg.getNode(e.target)!).map((t) => `${t.filePath}:${t.qualifiedName}`);
101};
102
103describe('Python names passed as values', () => {
104 it('never reach a function nested in another function', () => {

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesInFileMethod · 0.65
getOutgoingEdgesFromMethod · 0.45

Tested by

no test coverage detected