File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,11 +153,9 @@ export async function findProjectRoot(
153153): Promise<string> {
154154 let dirUri = uriDirname(entryUri)
155155
156- // If the entry file's directory doesn't have __init__.py it could be a
157- // top-level script OR a namespace package (no __init__.py) in a monorepo.
158- // Walk up toward the workspace root to find a pyproject.toml; if found,
159- // that directory is the Python project root. Otherwise fall back to the
160- // entry dir as before.
156+ // No __init__.py — could be a namespace package. Walk up toward the
157+ // workspace root to find a pyproject.toml; if found, that directory is
158+ // the Python project root. Otherwise fall back to the entry dir.
161159 if (!(await fs.exists(fs.joinPath(dirUri, "__init__.py")))) {
162160 let searchDir = dirUri
163161 while (isWithinDirectory(searchDir, workspaceRootUri)) {
You can’t perform that action at this time.
0 commit comments