summaryrefslogtreecommitdiff
path: root/ale_linters/python/pycln.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/python/pycln.vim')
-rw-r--r--ale_linters/python/pycln.vim8
1 files changed, 7 insertions, 1 deletions
diff --git a/ale_linters/python/pycln.vim b/ale_linters/python/pycln.vim
index 917a9757..774c6b04 100644
--- a/ale_linters/python/pycln.vim
+++ b/ale_linters/python/pycln.vim
@@ -7,6 +7,7 @@ call ale#Set('python_pycln_use_global', get(g:, 'ale_use_global_executables', 0)
call ale#Set('python_pycln_change_directory', 1)
call ale#Set('python_pycln_auto_pipenv', 0)
call ale#Set('python_pycln_auto_poetry', 0)
+call ale#Set('python_pycln_auto_uv', 0)
call ale#Set('python_pycln_config_file', '')
function! ale_linters#python#pycln#GetExecutable(buffer) abort
@@ -20,6 +21,11 @@ function! ale_linters#python#pycln#GetExecutable(buffer) abort
return 'poetry'
endif
+ if (ale#Var(a:buffer, 'python_auto_uv') || ale#Var(a:buffer, 'python_pycln_auto_uv'))
+ \ && ale#python#UvPresent(a:buffer)
+ return 'uv'
+ endif
+
return ale#python#FindExecutable(a:buffer, 'python_pycln', ['pycln'])
endfunction
@@ -36,7 +42,7 @@ endfunction
function! ale_linters#python#pycln#GetCommand(buffer, version) abort
let l:executable = ale_linters#python#pycln#GetExecutable(a:buffer)
- let l:exec_args = l:executable =~? 'pipenv\|poetry$'
+ let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$'
\ ? ' run pycln'
\ : ''