mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-31 08:34:30 +08:00
Python support poetry (#3834)
* Add poetry support to python linters and black fixer. * Update python.vim to detect poetry project. * Update ale.vim, add an option for poetry `g:ale_python_auto_poetry`. * Update ale-python.txt, add poetry support. * Add and update poetry related tests. Co-authored-by: unc0 <unc0@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
" Description: Functions for integrating with Python linters.
|
||||
|
||||
call ale#Set('python_auto_pipenv', '0')
|
||||
call ale#Set('python_auto_poetry', '0')
|
||||
|
||||
let s:sep = has('win32') ? '\' : '/'
|
||||
" bin is used for Unix virtualenv directories, and Scripts is for Windows.
|
||||
@@ -158,3 +159,8 @@ endfunction
|
||||
function! ale#python#PipenvPresent(buffer) abort
|
||||
return findfile('Pipfile.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
|
||||
endfunction
|
||||
|
||||
" Detects whether a poetry environment is present.
|
||||
function! ale#python#PoetryPresent(buffer) abort
|
||||
return findfile('poetry.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user