#729 - Support running Python programs from virtualenv for Windows

This commit is contained in:
w0rp committed 2017-07-05 13:07:55 +01:00
1 parent 1b8450e7a0
commit a04e73ddbc
7 files changed
+11 -29

No files matched your search

+2 -10
View File
@@ -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')