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

Function into

__tests__/python-overload-stubs.test.ts:41–48  ·  view source on GitHub ↗

Every edge into a def named `name`, as `kind from-name -> def line`.

(name: string)

Source from the content-addressed store, hash-verified

39
40/** Every edge into a def named `name`, as `kind from-name -> def line`. */
41function into(name: string): string[] {
42 return [...cg!.getNodesByKind('function'), ...cg!.getNodesByKind('method')]
43 .filter((n) => n.name === name)
44 .flatMap((n) => cg!.getIncomingEdges(n.id)
45 .filter((e) => e.kind !== 'contains')
46 .map((e) => `${e.kind} ${cg!.getNode(e.source)?.name} -> ${n.startLine}`))
47 .sort();
48}
49
50const DECO = [
51 'import typing as t',

Callers 1

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesByKindMethod · 0.65
getIncomingEdgesMethod · 0.65

Tested by

no test coverage detected