Skip to content

Commit 212d903

Browse files
committed
update for autoFind
1 parent 64d250f commit 212d903

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

src/features/creators/autoFindProjects.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import * as path from 'path';
22
import { Uri } from 'vscode';
3-
import { showErrorMessage, showQuickPickWithButtons, showWarningMessage } from '../../common/window.apis';
4-
import { ProjectCreatorString } from '../../common/localize';
53
import { PythonProject, PythonProjectCreator, PythonProjectCreatorOptions } from '../../api';
6-
import { PythonProjectManager } from '../../internal.api';
7-
import { findFiles } from '../../common/workspace.apis';
4+
import { ProjectCreatorString } from '../../common/localize';
85
import { traceInfo } from '../../common/logging';
6+
import { showErrorMessage, showQuickPickWithButtons, showWarningMessage } from '../../common/window.apis';
7+
import { findFiles } from '../../common/workspace.apis';
8+
import { PythonProjectManager, PythonProjectsImpl } from '../../internal.api';
99

1010
function getUniqueUri(uris: Uri[]): {
1111
label: string;
@@ -96,11 +96,9 @@ export class AutoFindProjects implements PythonProjectCreator {
9696
traceInfo('User cancelled project selection.');
9797
return;
9898
}
99-
100-
const projects = projectUris.map((uri) => ({
101-
name: path.basename(uri.fsPath),
102-
uri,
103-
})) as PythonProject[];
99+
const projects = projectUris.map(
100+
(uri) => new PythonProjectsImpl(path.basename(uri.fsPath), uri),
101+
) as PythonProject[];
104102
// Add the projects to the project manager
105103
this.pm.add(projects);
106104
return projects;

0 commit comments

Comments
 (0)