diff options
-rw-r--r-- | autoload/ale/fixers/autopep8.vim | 2 | ||||
-rw-r--r-- | autoload/ale/fixers/isort.vim | 2 | ||||
-rw-r--r-- | autoload/ale/fixers/yapf.vim | 2 | ||||
-rw-r--r-- | autoload/ale/python.vim | 8 |
4 files changed, 4 insertions, 10 deletions
diff --git a/autoload/ale/fixers/autopep8.vim b/autoload/ale/fixers/autopep8.vim index e0e6205f..e2dd7bfe 100644 --- a/autoload/ale/fixers/autopep8.vim +++ b/autoload/ale/fixers/autopep8.vim @@ -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 diff --git a/autoload/ale/fixers/isort.vim b/autoload/ale/fixers/isort.vim index ddd95611..00d968f4 100644 --- a/autoload/ale/fixers/isort.vim +++ b/autoload/ale/fixers/isort.vim @@ -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 diff --git a/autoload/ale/fixers/yapf.vim b/autoload/ale/fixers/yapf.vim index b15e481e..ba7453b8 100644 --- a/autoload/ale/fixers/yapf.vim +++ b/autoload/ale/fixers/yapf.vim @@ -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 diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim index 4734ac44..2a15f454 100644 --- a/autoload/ale/python.vim +++ b/autoload/ale/python.vim @@ -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 |