Skip to content

Commit dcf5db0

Browse files
edvilmeCopilot
andcommitted
Fix missing closing brace for PythonEnvironments namespace
Re-indent the api() function back inside the namespace and restore the namespace's closing brace that was dropped during a manual edit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5d23f5b commit dcf5db0

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

src/api.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,13 +1421,14 @@ export namespace PythonEnvironments {
14211421
/**
14221422
* Returns the API exposed by the Python Environments extension in VS Code.
14231423
*/
1424-
export async function api(): Promise<PythonEnvironmentApi> {
1425-
const extension = extensions.getExtension<PythonEnvironmentApi>(EXTENSION_ID);
1426-
if (extension === undefined) {
1427-
throw new Error(`Python Environments extension (${EXTENSION_ID}) is not installed or is disabled`);
1424+
export async function api(): Promise<PythonEnvironmentApi> {
1425+
const extension = extensions.getExtension<PythonEnvironmentApi>(EXTENSION_ID);
1426+
if (extension === undefined) {
1427+
throw new Error(`Python Environments extension (${EXTENSION_ID}) is not installed or is disabled`);
1428+
}
1429+
if (!extension.isActive) {
1430+
await extension.activate();
1431+
}
1432+
return extension.exports;
14281433
}
1429-
if (!extension.isActive) {
1430-
await extension.activate();
1431-
}
1432-
return extension.exports;
14331434
}

0 commit comments

Comments
 (0)