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

Function index

__tests__/python-local-scope-calls.test.ts:21–28  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

19let cg: CodeGraph | null = null;
20
21async function index(files: Record<string, string>): Promise<void> {
22 tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-pyscope-'));
23 for (const [rel, source] of Object.entries(files)) {
24 fs.mkdirSync(path.dirname(path.join(tempDir, rel)), { recursive: true });
25 fs.writeFileSync(path.join(tempDir, rel), source);
26 }
27 cg = await CodeGraph.init(tempDir, { index: true });
28}
29
30afterEach(() => {
31 cg?.close();

Calls 2

joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected