(file: string)
| 1284 | const index = buildPythonModuleIndex(context); |
| 1285 | const roots = [...index.projectRoots, ...index.localRoots.keys()]; |
| 1286 | const moduleNames = (file: string): string[] => { |
| 1287 | const out: string[] = []; |
| 1288 | const mod = file.replace(/(?:^|\/)__init__\.py$/, '').replace(/\.py$/, ''); |
| 1289 | for (const root of roots) { |
| 1290 | if (root && !mod.startsWith(`${root}/`)) continue; |
| 1291 | const rel = root ? mod.slice(root.length + 1) : mod; |
| 1292 | if (rel) out.push(rel.replace(/\//g, '.')); |
| 1293 | } |
| 1294 | return out; |
| 1295 | }; |
| 1296 | const affected = new Set<string>(); |
| 1297 | const sourceDirs = new Set<string>(); |
| 1298 | for (const raw of changedFiles) { |
no test coverage detected