diff options
author | w0rp <devw0rp@gmail.com> | 2017-11-04 10:46:19 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-11-04 10:47:47 +0000 |
commit | c1366f8a62399e0cf88db6219db7607f28359858 (patch) | |
tree | c0c800b0d600b41f6ebb1d6ec7fd0b91c9693f7e | |
parent | 5089b09b7eb4dd97ddb02b3219716c7a50910494 (diff) | |
download | ale-c1366f8a62399e0cf88db6219db7607f28359858.zip |
#1081 Remove the ale#python#IsExecutable function
-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 |