How `root` provides the top-level name `head`: concretely, as a namespace portion, or not at all.
(root: string, head: string, index: PythonModuleIndex)
| 860 | |
| 861 | /** How `root` provides the top-level name `head`: concretely, as a namespace portion, or not at all. */ |
| 862 | function pythonHeadKind(root: string, head: string, index: PythonModuleIndex): 'concrete' | 'namespace' | null { |
| 863 | const base = joinRel(root, head); |
| 864 | if (pythonModuleAt(base, index)) return 'concrete'; |
| 865 | return index.dirs.has(base) ? 'namespace' : null; |
| 866 | } |
| 867 | |
| 868 | /** Every root (project or local) providing the top-level name `head`, by kind. */ |
| 869 | function pythonRootHeads(head: string, index: PythonModuleIndex): { concrete: string[]; namespace: string[] } { |
no test coverage detected