#1081 Remove the ale#python#IsExecutable function
This commit is contained in:
parent
5089b09b7e
commit
c1366f8a62
4 changed files with 4 additions and 10 deletions
|
@ -12,7 +12,7 @@ function! ale#fixers#autopep8#Fix(buffer) abort
|
|||
\ ['autopep8'],
|
||||
\)
|
||||
|
||||
if !ale#python#IsExecutable(l:executable)
|
||||
if !executable(l:executable)
|
||||
return 0
|
||||
endif
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ function! ale#fixers#isort#Fix(buffer) abort
|
|||
\ ['isort'],
|
||||
\)
|
||||
|
||||
if !ale#python#IsExecutable(l:executable)
|
||||
if !executable(l:executable)
|
||||
return 0
|
||||
endif
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ function! ale#fixers#yapf#Fix(buffer) abort
|
|||
\ ['yapf'],
|
||||
\)
|
||||
|
||||
if !ale#python#IsExecutable(l:executable)
|
||||
if !executable(l:executable)
|
||||
return 0
|
||||
endif
|
||||
|
||||
|
|
|
@ -74,12 +74,6 @@ function! ale#python#FindVirtualenv(buffer) abort
|
|||
return $VIRTUAL_ENV
|
||||
endfunction
|
||||
|
||||
" Run an executable check for Python scripts.
|
||||
" On Windows, 1 will be returned if the file is merely readable.
|
||||
function! ale#python#IsExecutable(path) abort
|
||||
return executable(a:path)
|
||||
endfunction
|
||||
|
||||
" Given a buffer number and a command name, find the path to the executable.
|
||||
" First search on a virtualenv for Python, if nothing is found, try the global
|
||||
" command. Returns an empty string if cannot find the executable
|
||||
|
@ -96,7 +90,7 @@ function! ale#python#FindExecutable(buffer, base_var_name, path_list) abort
|
|||
\ join([l:virtualenv, s:bin_dir, l:path], s:sep)
|
||||
\)
|
||||
|
||||
if ale#python#IsExecutable(l:ve_executable)
|
||||
if executable(l:ve_executable)
|
||||
return l:ve_executable
|
||||
endif
|
||||
endfor
|
||||
|
|
Reference in a new issue