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

Function isPythonModuleLevelDef

src/resolution/import-resolver.ts:661–663  ·  view source on GitHub ↗

A def at module level — what `from mod import name` can bind.

(n: Node)

Source from the content-addressed store, hash-verified

659
660/** A def at module level — what `from mod import name` can bind. */
661function isPythonModuleLevelDef(n: Node): boolean {
662 return PYTHON_MODULE_LEVEL_KINDS.has(n.kind) && !n.qualifiedName.includes('::');
663}
664
665function parentDir(dir: string): string {
666 const slash = dir.lastIndexOf('/');

Callers 1

getFileExportIndexFunction · 0.85

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected