mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-09 22:14:44 +08:00
Allow all Python linter executables to be set to pipenv.
It appends ` run {linter_name}`, analogously to the Ruby linters when
the executable is set to `bundle`
This commit is contained in:
@@ -11,7 +11,13 @@ endfunction
|
||||
function! ale_linters#python#pyflakes#GetCommand(buffer) abort
|
||||
let l:executable = ale_linters#python#pyflakes#GetExecutable(a:buffer)
|
||||
|
||||
return ale#Escape(l:executable) . ' %t'
|
||||
let l:exec_args = l:executable =~? 'pipenv$'
|
||||
\ ? ' run pyflakes'
|
||||
\ : ''
|
||||
|
||||
return ale#Escape(l:executable)
|
||||
\ . l:exec_args
|
||||
\ . ' %t'
|
||||
endfunction
|
||||
|
||||
function! ale_linters#python#pyflakes#Handle(buffer, lines) abort
|
||||
|
||||
Reference in New Issue
Block a user