Skip to content

Commit 84901e2

Browse files
Cleanup old extraPaths (#395)
1 parent f2c9274 commit 84901e2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/databricks-vscode/src/language/ConfigureAutocomplete.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export class ConfigureAutocomplete implements Disposable {
219219
}
220220

221221
private async updateExtraPaths(): Promise<StepResult> {
222-
const extraPaths =
222+
let extraPaths =
223223
workspace
224224
.getConfiguration("python")
225225
.get<Array<string>>("analysis.extraPaths") ?? [];
@@ -229,6 +229,11 @@ export class ConfigureAutocomplete implements Disposable {
229229
if (extraPaths.includes(stubPath)) {
230230
return;
231231
}
232+
extraPaths = extraPaths.filter(
233+
(value) =>
234+
!value.endsWith(path.join("resources", "python", "stubs")) &&
235+
value.includes("databricks")
236+
);
232237
extraPaths.push(stubPath);
233238
workspace
234239
.getConfiguration("python")

0 commit comments

Comments
 (0)