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 Rosemanandunc0 authored and GitHub committed 2021-07-25 13:39:05 +09:00
1 parent 530b38de34
commit 7d8fb2ba17
32 files changed
+414 -16

No files matched your search

+16
View File
@@ -88,3 +88,19 @@ Execute(Pipenv is detected when python_mypy_auto_pipenv is set):
AssertLinterCwd expand('#' . bufnr('') . ':p:h')
AssertLinter 'pipenv',
\ ale#Escape('pipenv') . ' run mypy --show-column-numbers --shadow-file %s %t %s'
Execute(Setting executable to 'poetry' appends 'run mypy'):
let g:ale_python_mypy_executable = 'path/to/poetry'
AssertLinterCwd expand('#' . bufnr('') . ':p:h')
AssertLinter 'path/to/poetry',
\ ale#Escape('path/to/poetry') . ' run mypy'
\ . ' --show-column-numbers --shadow-file %s %t %s'
Execute(Poetry is detected when python_mypy_auto_poetry is set):
call ale#test#SetFilename('../test-files/python/poetry/whatever.py')
let g:ale_python_mypy_auto_poetry = 1
AssertLinterCwd expand('#' . bufnr('') . ':p:h')
AssertLinter 'poetry',
\ ale#Escape('poetry') . ' run mypy --show-column-numbers --shadow-file %s %t %s'