diff options
author | Daniel Roseman <daniel@roseman.org.uk> | 2021-07-25 05:39:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-25 13:39:05 +0900 |
commit | 7d8fb2ba1716a744446b811fc278ecf30d4eb771 (patch) | |
tree | cabed5301053216ab424e6f554dc7595b1948bb3 /test/linter/test_flake8.vader | |
parent | 530b38de342a21cce330a32af0c1b66671d335c2 (diff) | |
download | ale-7d8fb2ba1716a744446b811fc278ecf30d4eb771.zip |
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>
Diffstat (limited to 'test/linter/test_flake8.vader')
-rw-r--r-- | test/linter/test_flake8.vader | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/linter/test_flake8.vader b/test/linter/test_flake8.vader index 81efe497..0b87c27b 100644 --- a/test/linter/test_flake8.vader +++ b/test/linter/test_flake8.vader @@ -199,3 +199,19 @@ Execute(Pipenv is detected when python_flake8_auto_pipenv is set): AssertLinterCwd ale#python#FindProjectRootIni(bufnr('')) AssertLinter 'pipenv', \ ale#Escape('pipenv') . ' run flake8 --format=default --stdin-display-name %s -' + +Execute(Setting executable to 'poetry' should append 'run flake8'): + let g:ale_python_flake8_executable = 'path/to/poetry' + + " FIXME: poetry should check the version with flake8. + GivenCommandOutput [] + AssertLinter 'path/to/poetry', + \ ale#Escape('path/to/poetry') . ' run flake8 --format=default -' + +Execute(poetry is detected when python_flake8_auto_poetry is set): + let g:ale_python_flake8_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinterCwd ale#python#FindProjectRootIni(bufnr('')) + AssertLinter 'poetry', + \ ale#Escape('poetry') . ' run flake8 --format=default --stdin-display-name %s -' |