summaryrefslogtreecommitdiff
path: root/ale_linters/python/pyre.vim
diff options
context:
space:
mode:
authorDiego Henrique Oliveira <contato@diegoholiveira.com>2024-09-05 03:37:30 -0300
committerGitHub <noreply@github.com>2024-09-05 15:37:30 +0900
commita7ef1817b7aa06d0f80952ad530be87ad3c8f6e2 (patch)
tree537f36c4c8d5bdaeb10eb29ffc5bb8e18ef55065 /ale_linters/python/pyre.vim
parent954682108d21b412561fb32e3fa766c7ee539984 (diff)
downloadale-a7ef1817b7aa06d0f80952ad530be87ad3c8f6e2.zip
Improve support for python package manage: pipenv, poetry and uv (#4825)
Diffstat (limited to 'ale_linters/python/pyre.vim')
-rw-r--r--ale_linters/python/pyre.vim8
1 files changed, 7 insertions, 1 deletions
diff --git a/ale_linters/python/pyre.vim b/ale_linters/python/pyre.vim
index 5e5786f9..177f1cb5 100644
--- a/ale_linters/python/pyre.vim
+++ b/ale_linters/python/pyre.vim
@@ -5,6 +5,7 @@ call ale#Set('python_pyre_executable', 'pyre')
call ale#Set('python_pyre_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('python_pyre_auto_pipenv', 0)
call ale#Set('python_pyre_auto_poetry', 0)
+call ale#Set('python_pyre_auto_uv', 0)
function! ale_linters#python#pyre#GetExecutable(buffer) abort
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pyre_auto_pipenv'))
@@ -17,12 +18,17 @@ function! ale_linters#python#pyre#GetExecutable(buffer) abort
return 'poetry'
endif
+ if (ale#Var(a:buffer, 'python_auto_uv') || ale#Var(a:buffer, 'python_pyre_auto_uv'))
+ \ && ale#python#UvPresent(a:buffer)
+ return 'uv'
+ endif
+
return ale#python#FindExecutable(a:buffer, 'python_pyre', ['pyre'])
endfunction
function! ale_linters#python#pyre#GetCommand(buffer) abort
let l:executable = ale_linters#python#pyre#GetExecutable(a:buffer)
- let l:exec_args = (l:executable =~? 'pipenv\|poetry$' ? ' run pyre' : '') . ' persistent'
+ let l:exec_args = (l:executable =~? 'pipenv\|poetry\|uv$' ? ' run pyre' : '') . ' persistent'
return ale#Escape(l:executable) . l:exec_args
endfunction