File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ class PythonLanguageClient extends AutoLanguageClient {
111
111
}
112
112
}
113
113
114
- async getSuggestions ( request ) {
114
+ getSuggestions ( request ) {
115
115
if ( ! PYTHON_REGEX . test ( request . prefix ) ) {
116
116
return null
117
117
}
Original file line number Diff line number Diff line change @@ -22,27 +22,29 @@ function detectPipEnv(path) {
22
22
}
23
23
24
24
async function detectVirtualEnv ( path ) {
25
- const entries = await new Promise ( ( resolve ) =>
26
- new Directory ( path ) . getEntries ( ( error , entries ) => {
25
+ const entries = await new Promise ( ( resolve ) => {
26
+ new Directory ( path ) . getEntries ( ( error , resolvedEntries ) => {
27
27
if ( error === null ) {
28
- resolve ( entries )
28
+ resolve ( resolvedEntries )
29
29
} else {
30
30
resolve ( null )
31
31
}
32
32
} )
33
- )
33
+ } )
34
34
if ( entries ) {
35
35
for ( const entry of entries ) {
36
36
if ( entry . isDirectory ( ) ) {
37
37
if ( VIRTUAL_ENV_BIN_DIRS . indexOf ( entry . getBaseName ( ) ) !== - 1 ) {
38
38
for ( const executable of VIRTUAL_ENV_EXECUTABLES ) {
39
+ /* eslint-disable-next-line no-await-in-loop */
39
40
if ( await entry . getFile ( executable ) . exists ( ) ) {
40
41
return path
41
42
}
42
43
}
43
44
} else {
44
45
for ( const dir_name of VIRTUAL_ENV_BIN_DIRS ) {
45
46
for ( const executable of VIRTUAL_ENV_EXECUTABLES ) {
47
+ /* eslint-disable-next-line no-await-in-loop */
46
48
if ( await entry . getSubdirectory ( dir_name ) . getFile ( executable ) . exists ( ) ) {
47
49
return entry . getPath ( )
48
50
}
You can’t perform that action at this time.
0 commit comments