From a04e73ddbcbc2371424644145941f3878f894de8 Mon Sep 17 00:00:00 2001 From: w0rp Date: Wed, 5 Jul 2017 13:07:55 +0100 Subject: #729 - Support running Python programs from virtualenv for Windows --- ale_linters/python/flake8.vim | 12 ++---------- ale_linters/python/mypy.vim | 2 +- ale_linters/python/pylint.vim | 14 +------------- 3 files changed, 4 insertions(+), 24 deletions(-) (limited to 'ale_linters/python') diff --git a/ale_linters/python/flake8.vim b/ale_linters/python/flake8.vim index fb02e1ee..bf7b3027 100644 --- a/ale_linters/python/flake8.vim +++ b/ale_linters/python/flake8.vim @@ -19,16 +19,8 @@ function! s:UsingModule(buffer) abort endfunction function! ale_linters#python#flake8#GetExecutable(buffer) abort - if !s:UsingModule(a:buffer) && !ale#Var(a:buffer, 'python_flake8_use_global') - let l:virtualenv = ale#python#FindVirtualenv(a:buffer) - - if !empty(l:virtualenv) - let l:ve_flake8 = l:virtualenv . '/bin/flake8' - - if executable(l:ve_flake8) - return l:ve_flake8 - endif - endif + if !s:UsingModule(a:buffer) + return ale#python#FindExecutable(a:buffer, 'python_flake8', ['flake8']) endif return ale#Var(a:buffer, 'python_flake8_executable') diff --git a/ale_linters/python/mypy.vim b/ale_linters/python/mypy.vim index e39ee349..f71365a6 100644 --- a/ale_linters/python/mypy.vim +++ b/ale_linters/python/mypy.vim @@ -7,7 +7,7 @@ let g:ale_python_mypy_options = get(g:, 'ale_python_mypy_options', '') let g:ale_python_mypy_use_global = get(g:, 'ale_python_mypy_use_global', 0) function! ale_linters#python#mypy#GetExecutable(buffer) abort - return ale#python#FindExecutable(a:buffer, 'python_mypy', ['/bin/mypy']) + return ale#python#FindExecutable(a:buffer, 'python_mypy', ['mypy']) endfunction function! ale_linters#python#mypy#GetCommand(buffer) abort diff --git a/ale_linters/python/pylint.vim b/ale_linters/python/pylint.vim index dcb26c78..6f95776b 100644 --- a/ale_linters/python/pylint.vim +++ b/ale_linters/python/pylint.vim @@ -10,19 +10,7 @@ let g:ale_python_pylint_options = let g:ale_python_pylint_use_global = get(g:, 'ale_python_pylint_use_global', 0) function! ale_linters#python#pylint#GetExecutable(buffer) abort - if !ale#Var(a:buffer, 'python_pylint_use_global') - let l:virtualenv = ale#python#FindVirtualenv(a:buffer) - - if !empty(l:virtualenv) - let l:ve_pylint = l:virtualenv . '/bin/pylint' - - if executable(l:ve_pylint) - return l:ve_pylint - endif - endif - endif - - return ale#Var(a:buffer, 'python_pylint_executable') + return ale#python#FindExecutable(a:buffer, 'python_pylint', ['pylint']) endfunction function! ale_linters#python#pylint#GetCommand(buffer) abort -- cgit v1.2.3