summaryrefslogtreecommitdiff
path: root/ale_linters/python/prospector.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/python/prospector.vim')
-rw-r--r--ale_linters/python/prospector.vim8
1 files changed, 7 insertions, 1 deletions
diff --git a/ale_linters/python/prospector.vim b/ale_linters/python/prospector.vim
index ee47012f..3623bda0 100644
--- a/ale_linters/python/prospector.vim
+++ b/ale_linters/python/prospector.vim
@@ -2,6 +2,7 @@
" Description: prospector linter python files
call ale#Set('python_prospector_auto_pipenv', 0)
+call ale#Set('python_prospector_auto_poetry', 0)
let g:ale_python_prospector_executable =
\ get(g:, 'ale_python_prospector_executable', 'prospector')
@@ -17,13 +18,18 @@ function! ale_linters#python#prospector#GetExecutable(buffer) abort
return 'pipenv'
endif
+ if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_prospector_auto_poetry'))
+ \ && ale#python#PoetryPresent(a:buffer)
+ return 'poetry'
+ endif
+
return ale#python#FindExecutable(a:buffer, 'python_prospector', ['prospector'])
endfunction
function! ale_linters#python#prospector#GetCommand(buffer) abort
let l:executable = ale_linters#python#prospector#GetExecutable(a:buffer)
- let l:exec_args = l:executable =~? 'pipenv$'
+ let l:exec_args = l:executable =~? 'pipenv\|poetry$'
\ ? ' run prospector'
\ : ''