How `root` provides the top-level name `head`: concretely, as a namespace portion, or not at all.
(root: string, head: string, index: PythonModuleIndex)
| 1108 | |
| 1109 | /** How `root` provides the top-level name `head`: concretely, as a namespace portion, or not at all. */ |
| 1110 | function pythonHeadKind(root: string, head: string, index: PythonModuleIndex): 'concrete' | 'namespace' | null { |
| 1111 | const base = joinRel(root, head); |
| 1112 | if (pythonModuleAt(base, index)) return 'concrete'; |
| 1113 | return index.dirs.has(base) ? 'namespace' : null; |
| 1114 | } |
| 1115 | |
| 1116 | /** Every root (project or local) providing the top-level name `head`, by kind. */ |
| 1117 | function pythonRootHeads(head: string, index: PythonModuleIndex): { concrete: string[]; namespace: string[] } { |
no test coverage detected