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

Function add

src/resolution/import-resolver.ts:775–779  ·  view source on GitHub ↗
(raw: string)

Source from the content-addressed store, hash-verified

773function declaredPythonRoots(context: ResolutionContext, service: string): string[] {
774 const out: string[] = [];
775 const add = (raw: string): void => {
776 const dir = raw.trim().replace(/^["']|["']$/g, '').replace(/^\.(?:\/|$)/, '').replace(/\/+$/, '');
777 if (!dir || dir.startsWith('..') || path.isAbsolute(dir)) return;
778 out.push(joinRel(service, dir));
779 };
780 const toml = context.readFile(joinRel(service, 'pyproject.toml'));
781 if (toml) {
782 for (const [table, body] of iniTables(toml)) {

Callers 1

declaredPythonRootsFunction · 0.70

Calls 2

joinRelFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected