Skip to content

Commit 1dc6bc6

Browse files
author
Kartik Raj
committed
Add scope to diagnostic
1 parent ee36865 commit 1dc6bc6

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/client/application/diagnostics/checks/pythonInterpreter.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export class InvalidPythonInterpreterDiagnostic extends BaseDiagnostic {
4545
code: DiagnosticCodes.NoPythonInterpretersDiagnostic | DiagnosticCodes.InvalidPythonInterpreterDiagnostic,
4646
resource: Resource,
4747
workspaceService: IWorkspaceService,
48+
scope = DiagnosticScope.WorkspaceFolder,
4849
) {
4950
let formatArg = '';
5051
if (workspaceService.workspaceFile) {
@@ -54,15 +55,7 @@ export class InvalidPythonInterpreterDiagnostic extends BaseDiagnostic {
5455
formatArg = ` for ${path.basename(folder.uri.fsPath)}`;
5556
}
5657
}
57-
super(
58-
code,
59-
messages[code].format(formatArg),
60-
DiagnosticSeverity.Error,
61-
DiagnosticScope.WorkspaceFolder,
62-
resource,
63-
undefined,
64-
'always',
65-
);
58+
super(code, messages[code].format(formatArg), DiagnosticSeverity.Error, scope, resource, undefined, 'always');
6659
}
6760
}
6861

@@ -93,6 +86,7 @@ export class InvalidPythonInterpreterService extends BaseDiagnosticsService {
9386
DiagnosticCodes.NoPythonInterpretersDiagnostic,
9487
resource,
9588
workspaceService,
89+
DiagnosticScope.Global,
9690
),
9791
];
9892
}

0 commit comments

Comments
 (0)