File tree 2 files changed +10
-5
lines changed 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 200
200
" async def ${1:funcname}(${2:parameter_list}):" ,
201
201
" \t ${3:pass}"
202
202
],
203
- "description" : " Code snippet for a async statement"
203
+ "description" : " Code snippet for an async statement"
204
204
},
205
205
"async/for" : {
206
206
"prefix" : " async/for" ,
207
207
"body" : [
208
208
" async for ${1:target} in ${2:iter}:" ,
209
209
" \t ${3:block}"
210
210
],
211
- "description" : " Code snippet for a async for statement"
211
+ "description" : " Code snippet for an async for statement"
212
212
},
213
213
"async/for/else" : {
214
214
"prefix" : " async/for/else" ,
218
218
" else:" ,
219
219
" \t ${4:block}"
220
220
],
221
- "description" : " Code snippet for a async for statement with else"
221
+ "description" : " Code snippet for an async for statement with else"
222
222
},
223
223
"async/with" : {
224
224
"prefix" : " async/with" ,
225
225
"body" : [
226
226
" async with ${1:expr} as ${2:var}:" ,
227
227
" \t ${3:block}"
228
228
],
229
- "description" : " Code snippet for a async with statement"
229
+ "description" : " Code snippet for an async with statement"
230
230
},
231
231
"ipdb" : {
232
232
"prefix" : " ipdb" ,
Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ export class InterpreterManager implements Disposable {
47
47
const interpreters = await this . interpreterProvider . getInterpreters ( activeWorkspace . folderUri ) ;
48
48
const workspacePathUpper = activeWorkspace . folderUri . fsPath . toUpperCase ( ) ;
49
49
const interpretersInWorkspace = interpreters . filter ( interpreter => interpreter . path . toUpperCase ( ) . startsWith ( workspacePathUpper ) ) ;
50
- if ( interpretersInWorkspace . length !== 1 ) {
50
+ // Always pick the first available one.
51
+ if ( interpretersInWorkspace . length === 0 ) {
51
52
return ;
52
53
}
53
54
@@ -73,6 +74,10 @@ export class InterpreterManager implements Disposable {
73
74
}
74
75
const pythonConfig = workspace . getConfiguration ( 'python' , activeWorkspace . folderUri ) ;
75
76
const pythonPathInConfig = pythonConfig . inspect < string > ( 'pythonPath' ) ;
77
+ // If we have a value in user settings, then don't auto set the interpreter path.
78
+ if ( pythonPathInConfig && pythonPathInConfig ! . globalValue !== undefined && pythonPathInConfig ! . globalValue !== 'python' ) {
79
+ return false ;
80
+ }
76
81
if ( activeWorkspace . configTarget === ConfigurationTarget . Workspace ) {
77
82
return pythonPathInConfig . workspaceValue === undefined || pythonPathInConfig . workspaceValue === 'python' ;
78
83
}
You can’t perform that action at this time.
0 commit comments