mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-08 02:41:05 +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:
@@ -55,3 +55,13 @@ Execute(Pipenv is detected when python_black_auto_pipenv is set):
|
||||
AssertEqual
|
||||
\ {'command': ale#Escape('pipenv') . ' run black -'},
|
||||
\ ale#fixers#black#Fix(bufnr(''))
|
||||
|
||||
Execute(Poetry is detected when python_black_auto_poetry is set):
|
||||
let g:ale_python_black_auto_poetry = 1
|
||||
let g:ale_python_black_change_directory = 0
|
||||
|
||||
call ale#test#SetFilename('../test-files/python/poetry/whatever.py')
|
||||
|
||||
AssertEqual
|
||||
\ {'command': ale#Escape('poetry') . ' run black -'},
|
||||
\ ale#fixers#black#Fix(bufnr(''))
|
||||
|
||||
Reference in New Issue
Block a user