How `root` provides the top-level name `head`: concretely, as a namespace portion, or not at all.
(root: string, head: string, index: PythonModuleIndex)
| 844 | |
| 845 | /** How `root` provides the top-level name `head`: concretely, as a namespace portion, or not at all. */ |
| 846 | function pythonHeadKind(root: string, head: string, index: PythonModuleIndex): 'concrete' | 'namespace' | null { |
| 847 | const base = joinRel(root, head); |
| 848 | if (pythonModuleAt(base, index)) return 'concrete'; |
| 849 | return index.dirs.has(base) ? 'namespace' : null; |
| 850 | } |
| 851 | |
| 852 | /** Every root (project or local) providing the top-level name `head`, by kind. */ |
| 853 | function pythonRootHeads(head: string, index: PythonModuleIndex): { concrete: string[]; namespace: string[] } { |
no test coverage detected