We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8c1d816 + f6dfb3f commit d4d83f3Copy full SHA for d4d83f3
editor-plugins/vscode/src/extension.ts
@@ -82,11 +82,13 @@ export async function run_formatter(
82
let options = PythonShell.defaultOptions;
83
options.scriptPath = SCRIPT_PATH;
84
85
- const pythonPath: string | undefined = vscode.workspace
86
- .getConfiguration("python")
87
- .get("pythonPath");
88
- if (!!pythonPath) {
89
- options.pythonPath = pythonPath;
+ const pythonConfig = vscode.workspace.getConfiguration("python");
+ for (const pathSettingKey of ["defaultInterpreterPath", "pythonPath"]) {
+ const pythonPath: string | undefined = pythonConfig.get(pathSettingKey);
+ if (!!pythonPath) {
+ options.pythonPath = pythonPath;
90
+ break;
91
+ }
92
}
93
94
let input = script;
0 commit comments