summaryrefslogtreecommitdiff
path: root/ale_linters/python/bandit.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/python/bandit.vim')
-rw-r--r--ale_linters/python/bandit.vim8
1 files changed, 7 insertions, 1 deletions
diff --git a/ale_linters/python/bandit.vim b/ale_linters/python/bandit.vim
index 9cfca7c0..ba48c3a8 100644
--- a/ale_linters/python/bandit.vim
+++ b/ale_linters/python/bandit.vim
@@ -7,6 +7,7 @@ call ale#Set('python_bandit_use_config', 1)
call ale#Set('python_bandit_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('python_bandit_auto_pipenv', 0)
call ale#Set('python_bandit_auto_poetry', 0)
+call ale#Set('python_bandit_auto_uv', 0)
function! ale_linters#python#bandit#GetExecutable(buffer) abort
if (
@@ -23,6 +24,11 @@ function! ale_linters#python#bandit#GetExecutable(buffer) abort
return 'poetry'
endif
+ if (ale#Var(a:buffer, 'python_auto_uv') || ale#Var(a:buffer, 'python_bandit_auto_uv'))
+ \ && ale#python#UvPresent(a:buffer)
+ return 'uv'
+ endif
+
return ale#python#FindExecutable(a:buffer, 'python_bandit', ['bandit'])
endfunction
@@ -39,7 +45,7 @@ function! ale_linters#python#bandit#GetCommand(buffer) abort
endif
endif
- let l:exec_args = l:executable =~? 'pipenv\|poetry$'
+ let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$'
\ ? ' run bandit'
\ : ''