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:
Daniel Roseman
2021-07-25 05:39:05 +01:00
committed by GitHub
parent 530b38de34
commit 7d8fb2ba17
32 changed files with 414 additions and 16 deletions

View File

@@ -44,3 +44,16 @@ Execute(Pipenv is detected when python_pyflakes_auto_pipenv is set):
AssertLinter 'pipenv',
\ ale#Escape('pipenv') . ' run pyflakes %t'
Execute(Setting executable to 'poetry' appends 'run pyflakes'):
let g:ale_python_pyflakes_executable = 'path/to/poetry'
AssertLinter 'path/to/poetry',
\ ale#Escape('path/to/poetry') . ' run pyflakes %t',
Execute(Poetry is detected when python_pyflakes_auto_poetry is set):
let g:ale_python_pyflakes_auto_poetry = 1
call ale#test#SetFilename('../test-files/python/poetry/whatever.py')
AssertLinter 'poetry',
\ ale#Escape('poetry') . ' run pyflakes %t'