summaryrefslogtreecommitdiff
path: root/ale_linters/python/vulture.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/python/vulture.vim')
-rw-r--r--ale_linters/python/vulture.vim20
1 files changed, 19 insertions, 1 deletions
diff --git a/ale_linters/python/vulture.vim b/ale_linters/python/vulture.vim
index a7ba1860..2ac05e43 100644
--- a/ale_linters/python/vulture.vim
+++ b/ale_linters/python/vulture.vim
@@ -5,6 +5,9 @@ call ale#Set('python_vulture_executable', 'vulture')
call ale#Set('python_vulture_options', '')
call ale#Set('python_vulture_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('python_vulture_change_directory', 1)
+call ale#Set('python_vulture_auto_pipenv', 0)
+call ale#Set('python_vulture_auto_poetry', 0)
+call ale#Set('python_vulture_auto_uv', 0)
" The directory to change to before running vulture
function! s:GetDir(buffer) abort
@@ -16,6 +19,21 @@ function! s:GetDir(buffer) abort
endfunction
function! ale_linters#python#vulture#GetExecutable(buffer) abort
+ if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_vulture_auto_pipenv'))
+ \ && ale#python#PipenvPresent(a:buffer)
+ return 'pipenv'
+ endif
+
+ if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_vulture_auto_poetry'))
+ \ && ale#python#PoetryPresent(a:buffer)
+ return 'poetry'
+ endif
+
+ if (ale#Var(a:buffer, 'python_auto_uv') || ale#Var(a:buffer, 'python_vulture_auto_uv'))
+ \ && ale#python#UvPresent(a:buffer)
+ return 'uv'
+ endif
+
return ale#python#FindExecutable(a:buffer, 'python_vulture', ['vulture'])
endfunction
@@ -29,7 +47,7 @@ endfunction
function! ale_linters#python#vulture#GetCommand(buffer) abort
let l:executable = ale_linters#python#vulture#GetExecutable(a:buffer)
- let l:exec_args = l:executable =~? 'pipenv\|poetry$'
+ let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$'
\ ? ' run vulture'
\ : ''
let l:lint_dest = ale#Var(a:buffer, 'python_vulture_change_directory')