Skip to content

Commit 0b5feb1

Browse files
committed
Oops
1 parent 01d8f1d commit 0b5feb1

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

src/client/datascience/api/jupyterIntegration.ts

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -74,29 +74,30 @@ export class JupyterExtensionIntegration {
7474
return;
7575
}
7676
await jupyterExtension.activate();
77-
if (jupyterExtension.isActive) {
78-
const jupyterExtensionApi = jupyterExtension.exports;
79-
jupyterExtensionApi.registerPythonApi({
80-
onDidChangeInterpreter: this.interpreterService.onDidChangeInterpreter,
81-
getActiveInterpreter: async (resource?: Uri) => this.interpreterService.getActiveInterpreter(resource),
82-
getInterpreterDetails: async (pythonPath: string) =>
83-
this.interpreterService.getInterpreterDetails(pythonPath),
84-
getInterpreters: async (resource: Uri | undefined) => this.interpreterService.getInterpreters(resource),
85-
getActivatedEnvironmentVariables: async (
86-
resource: Resource,
87-
interpreter?: PythonEnvironment,
88-
allowExceptions?: boolean
89-
) => this.envActivation.getActivatedEnvironmentVariables(resource, interpreter, allowExceptions),
90-
isWindowsStoreInterpreter: async (pythonPath: string): Promise<boolean> =>
91-
this.windowsStoreInterpreter.isWindowsStoreInterpreter(pythonPath),
92-
getSuggestions: async (resource: Resource): Promise<IInterpreterQuickPickItem[]> =>
93-
this.interpreterSelector.getSuggestions(resource),
94-
install: async (
95-
product: Product,
96-
resource?: InterpreterUri,
97-
cancel?: CancellationToken
98-
): Promise<InstallerResponse> => this.installer.install(product, resource, cancel)
99-
});
77+
if (!jupyterExtension.isActive) {
78+
return;
10079
}
80+
const jupyterExtensionApi = jupyterExtension.exports;
81+
jupyterExtensionApi.registerPythonApi({
82+
onDidChangeInterpreter: this.interpreterService.onDidChangeInterpreter,
83+
getActiveInterpreter: async (resource?: Uri) => this.interpreterService.getActiveInterpreter(resource),
84+
getInterpreterDetails: async (pythonPath: string) =>
85+
this.interpreterService.getInterpreterDetails(pythonPath),
86+
getInterpreters: async (resource: Uri | undefined) => this.interpreterService.getInterpreters(resource),
87+
getActivatedEnvironmentVariables: async (
88+
resource: Resource,
89+
interpreter?: PythonEnvironment,
90+
allowExceptions?: boolean
91+
) => this.envActivation.getActivatedEnvironmentVariables(resource, interpreter, allowExceptions),
92+
isWindowsStoreInterpreter: async (pythonPath: string): Promise<boolean> =>
93+
this.windowsStoreInterpreter.isWindowsStoreInterpreter(pythonPath),
94+
getSuggestions: async (resource: Resource): Promise<IInterpreterQuickPickItem[]> =>
95+
this.interpreterSelector.getSuggestions(resource),
96+
install: async (
97+
product: Product,
98+
resource?: InterpreterUri,
99+
cancel?: CancellationToken
100+
): Promise<InstallerResponse> => this.installer.install(product, resource, cancel)
101+
});
101102
}
102103
}

0 commit comments

Comments
 (0)