From 9010458581c4a69f6c987830254391d9c041b236 Mon Sep 17 00:00:00 2001 From: w0rp Date: Sat, 4 Nov 2017 10:41:08 +0000 Subject: [PATCH] #1081 Use executable() for Python executables on Windows, and rename the test files to .exe so they will pass the executable() check --- autoload/ale/python.vim | 2 +- .../with_virtualenv/env/Scripts/{autopep8 => autopep8.exe} | 0 .../with_virtualenv/env/Scripts/{flake8 => flake8.exe} | 0 .../with_virtualenv/env/Scripts/{isort => isort.exe} | 0 .../python_paths/with_virtualenv/env/Scripts/{mypy => mypy.exe} | 0 .../with_virtualenv/env/Scripts/{pylint => pylint.exe} | 0 .../python_paths/with_virtualenv/env/Scripts/{yapf => yapf.exe} | 0 7 files changed, 1 insertion(+), 1 deletion(-) rename test/command_callback/python_paths/with_virtualenv/env/Scripts/{autopep8 => autopep8.exe} (100%) rename test/command_callback/python_paths/with_virtualenv/env/Scripts/{flake8 => flake8.exe} (100%) rename test/command_callback/python_paths/with_virtualenv/env/Scripts/{isort => isort.exe} (100%) rename test/command_callback/python_paths/with_virtualenv/env/Scripts/{mypy => mypy.exe} (100%) rename test/command_callback/python_paths/with_virtualenv/env/Scripts/{pylint => pylint.exe} (100%) rename test/command_callback/python_paths/with_virtualenv/env/Scripts/{yapf => yapf.exe} (100%) diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim index d788b779..4734ac44 100644 --- a/autoload/ale/python.vim +++ b/autoload/ale/python.vim @@ -77,7 +77,7 @@ 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 has('win32') ? filereadable(a:path) : executable(a:path) + return executable(a:path) endfunction " Given a buffer number and a command name, find the path to the executable. diff --git a/test/command_callback/python_paths/with_virtualenv/env/Scripts/autopep8 b/test/command_callback/python_paths/with_virtualenv/env/Scripts/autopep8.exe similarity index 100% rename from test/command_callback/python_paths/with_virtualenv/env/Scripts/autopep8 rename to test/command_callback/python_paths/with_virtualenv/env/Scripts/autopep8.exe diff --git a/test/command_callback/python_paths/with_virtualenv/env/Scripts/flake8 b/test/command_callback/python_paths/with_virtualenv/env/Scripts/flake8.exe similarity index 100% rename from test/command_callback/python_paths/with_virtualenv/env/Scripts/flake8 rename to test/command_callback/python_paths/with_virtualenv/env/Scripts/flake8.exe diff --git a/test/command_callback/python_paths/with_virtualenv/env/Scripts/isort b/test/command_callback/python_paths/with_virtualenv/env/Scripts/isort.exe similarity index 100% rename from test/command_callback/python_paths/with_virtualenv/env/Scripts/isort rename to test/command_callback/python_paths/with_virtualenv/env/Scripts/isort.exe diff --git a/test/command_callback/python_paths/with_virtualenv/env/Scripts/mypy b/test/command_callback/python_paths/with_virtualenv/env/Scripts/mypy.exe similarity index 100% rename from test/command_callback/python_paths/with_virtualenv/env/Scripts/mypy rename to test/command_callback/python_paths/with_virtualenv/env/Scripts/mypy.exe diff --git a/test/command_callback/python_paths/with_virtualenv/env/Scripts/pylint b/test/command_callback/python_paths/with_virtualenv/env/Scripts/pylint.exe similarity index 100% rename from test/command_callback/python_paths/with_virtualenv/env/Scripts/pylint rename to test/command_callback/python_paths/with_virtualenv/env/Scripts/pylint.exe diff --git a/test/command_callback/python_paths/with_virtualenv/env/Scripts/yapf b/test/command_callback/python_paths/with_virtualenv/env/Scripts/yapf.exe similarity index 100% rename from test/command_callback/python_paths/with_virtualenv/env/Scripts/yapf rename to test/command_callback/python_paths/with_virtualenv/env/Scripts/yapf.exe