mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +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:
@@ -10,6 +10,14 @@ g:ale_python_auto_pipenv *g:ale_python_auto_pipenv*
|
||||
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
g:ale_python_auto_poetry *g:ale_python_auto_poetry*
|
||||
*b:ale_python_auto_poetry*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
===============================================================================
|
||||
ALE Python Project Root Behavior *ale-python-root*
|
||||
|
||||
@@ -136,6 +144,7 @@ g:ale_python_bandit_executable *g:ale_python_bandit_executable*
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
Set this to `'pipenv'` to invoke `'pipenv` `run` `bandit'`.
|
||||
Set this to `'poetry'` to invoke `'poetry` `run` `bandit'`.
|
||||
|
||||
|
||||
g:ale_python_bandit_options *g:ale_python_bandit_options*
|
||||
@@ -175,6 +184,15 @@ g:ale_python_bandit_auto_pipenv *g:ale_python_bandit_auto_pipenv*
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_bandit_auto_poetry *g:ale_python_bandit_auto_poetry*
|
||||
*b:ale_python_bandit_auto_poetry*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
black *ale-python-black*
|
||||
|
||||
@@ -210,6 +228,14 @@ g:ale_python_black_auto_pipenv *g:ale_python_black_auto_pipenv*
|
||||
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
g:ale_python_black_auto_poetry *g:ale_python_black_auto_poetry*
|
||||
*b:ale_python_black_auto_poetry*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
g:ale_python_black_change_directory *g:ale_python_black_change_directory*
|
||||
*b:ale_python_black_change_directory*
|
||||
Type: |Number|
|
||||
@@ -242,7 +268,8 @@ g:ale_python_flake8_executable *g:ale_python_flake8_executable*
|
||||
Default: `'flake8'`
|
||||
|
||||
This variable can be changed to modify the executable used for flake8. Set
|
||||
this to `'pipenv'` to invoke `'pipenv` `run` `flake8'`.
|
||||
this to `'pipenv'` to invoke `'pipenv` `run` `flake8'`. Set this to
|
||||
`'poetry'` to invoke `'poetry` `run` `flake8'`.
|
||||
|
||||
|
||||
g:ale_python_flake8_options *g:ale_python_flake8_options*
|
||||
@@ -284,6 +311,15 @@ g:ale_python_flake8_auto_pipenv *g:ale_python_flake8_auto_pipenv*
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_flake8_auto_poetry *g:ale_python_flake8_auto_poetry*
|
||||
*b:ale_python_flake8_auto_poetry*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
isort *ale-python-isort*
|
||||
|
||||
@@ -339,6 +375,15 @@ g:ale_python_mypy_auto_pipenv *g:ale_python_mypy_auto_pipenv*
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_mypy_auto_poetry *g:ale_python_mypy_auto_poetry*
|
||||
*b:ale_python_mypy_auto_poetry*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_mypy_executable *g:ale_python_mypy_executable*
|
||||
*b:ale_python_mypy_executable*
|
||||
Type: |String|
|
||||
@@ -347,6 +392,7 @@ g:ale_python_mypy_executable *g:ale_python_mypy_executable*
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
Set this to `'pipenv'` to invoke `'pipenv` `run` `mypy'`.
|
||||
Set this to `'poetry'` to invoke `'poetry` `run` `mypy'`.
|
||||
|
||||
|
||||
g:ale_python_mypy_ignore_invalid_syntax
|
||||
@@ -397,6 +443,7 @@ g:ale_python_prospector_executable *g:ale_python_prospector_executable*
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
Set this to `'pipenv'` to invoke `'pipenv` `run` `prospector'`.
|
||||
Set this to `'poetry'` to invoke `'poetry` `run` `prospector'`.
|
||||
|
||||
|
||||
g:ale_python_prospector_options *g:ale_python_prospector_options*
|
||||
@@ -437,6 +484,15 @@ g:ale_python_prospector_auto_pipenv *g:ale_python_prospector_auto_pipenv*
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_prospector_auto_poetry *g:ale_python_prospector_auto_poetry*
|
||||
*b:ale_python_prospector_auto_poetry*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
pycodestyle *ale-python-pycodestyle*
|
||||
|
||||
@@ -449,6 +505,7 @@ g:ale_python_pycodestyle_executable *g:ale_python_pycodestyle_executable*
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
Set this to `'pipenv'` to invoke `'pipenv` `run` `pycodestyle'`.
|
||||
Set this to `'poetry'` to invoke `'poetry` `run` `pycodestyle'`.
|
||||
|
||||
|
||||
g:ale_python_pycodestyle_options *g:ale_python_pycodestyle_options*
|
||||
@@ -477,6 +534,15 @@ g:ale_python_pycodestyle_auto_pipenv *g:ale_python_pycodestyle_auto_pipenv*
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_pycodestyle_auto_poetry *g:ale_python_pycodestyle_auto_poetry*
|
||||
*b:ale_python_pycodestyle_auto_poetry*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
pydocstyle *ale-python-pydocstyle*
|
||||
|
||||
@@ -489,6 +555,7 @@ g:ale_python_pydocstyle_executable *g:ale_python_pydocstyle_executable*
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
Set this to `'pipenv'` to invoke `'pipenv` `run` `pydocstyle'`.
|
||||
Set this to `'poetry'` to invoke `'poetry` `run` `pydocstyle'`.
|
||||
|
||||
|
||||
g:ale_python_pydocstyle_options *g:ale_python_pydocstyle_options*
|
||||
@@ -517,6 +584,15 @@ g:ale_python_pydocstyle_auto_pipenv *g:ale_python_pydocstyle_auto_pipenv*
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_pydocstyle_auto_poetry *g:ale_python_pydocstyle_auto_poetry*
|
||||
*b:ale_python_pydocstyle_auto_poetry*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
pyflakes *ale-python-pyflakes*
|
||||
|
||||
@@ -529,6 +605,7 @@ g:ale_python_pyflakes_executable *g:ale_python_pyflakes_executable*
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
Set this to `'pipenv'` to invoke `'pipenv` `run` `pyflakes'`.
|
||||
Set this to `'poetry'` to invoke `'poetry` `run` `pyflakes'`.
|
||||
|
||||
|
||||
g:ale_python_pyflakes_auto_pipenv *g:ale_python_pyflakes_auto_pipenv*
|
||||
@@ -540,6 +617,15 @@ g:ale_python_pyflakes_auto_pipenv *g:ale_python_pyflakes_auto_pipenv*
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_pyflakes_auto_poetry *g:ale_python_pyflakes_auto_poetry*
|
||||
*b:ale_python_pyflakes_auto_poetry*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
pylama *ale-python-pylama*
|
||||
|
||||
@@ -561,7 +647,8 @@ g:ale_python_pylama_executable *g:ale_python_pylama_executable*
|
||||
Default: `'pylama'`
|
||||
|
||||
This variable can be changed to modify the executable used for pylama. Set
|
||||
this to `'pipenv'` to invoke `'pipenv` `run` `pylama'`.
|
||||
this to `'pipenv'` to invoke `'pipenv` `run` `pylama'`. Set this to
|
||||
`'poetry'` to invoke `'poetry` `run` `pylama'`.
|
||||
|
||||
|
||||
g:ale_python_pylama_options *g:ale_python_pylama_options*
|
||||
@@ -594,6 +681,15 @@ g:ale_python_pylama_auto_pipenv *g:ale_python_pylama_auto_pipenv*
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_pylama_auto_poetry *g:ale_python_pylama_auto_poetry*
|
||||
*b:ale_python_pylama_auto_poetry*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
pylint *ale-python-pylint*
|
||||
|
||||
@@ -618,6 +714,7 @@ g:ale_python_pylint_executable *g:ale_python_pylint_executable*
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
Set this to `'pipenv'` to invoke `'pipenv` `run` `pylint'`.
|
||||
Set this to `'poetry'` to invoke `'poetry` `run` `pylint'`.
|
||||
|
||||
|
||||
g:ale_python_pylint_options *g:ale_python_pylint_options*
|
||||
@@ -657,6 +754,15 @@ g:ale_python_pylint_auto_pipenv *g:ale_python_pylint_auto_pipenv*
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_pylint_auto_poetry *g:ale_python_pylint_auto_poetry*
|
||||
*b:ale_python_pylint_auto_poetry*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_pylint_use_msg_id *g:ale_python_pylint_use_msg_id*
|
||||
*b:ale_python_pylint_use_msg_id*
|
||||
Type: |Number|
|
||||
@@ -680,6 +786,7 @@ g:ale_python_pylsp_executable *g:ale_python_pylsp_executable
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
Set this to `'pipenv'` to invoke `'pipenv` `run` `pylsp'`.
|
||||
Set this to `'poetry'` to invoke `'poetry` `run` `pyls'`.
|
||||
|
||||
|
||||
g:ale_python_pylsp_use_global *g:ale_python_pylsp_use_global*
|
||||
@@ -699,6 +806,15 @@ g:ale_python_pylsp_auto_pipenv *g:ale_python_pylsp_auto_pipenv
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_pylsp_auto_poetry *g:ale_python_pylsp_auto_poetry*
|
||||
*b:ale_python_pylsp_auto_poetry*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_pylsp_config *g:ale_python_pylsp_config*
|
||||
*b:ale_python_pylsp_config*
|
||||
Type: |Dictionary|
|
||||
@@ -750,6 +866,7 @@ g:ale_python_pyre_executable *g:ale_python_pyre_executable*
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
Set this to `'pipenv'` to invoke `'pipenv` `run` `pyre'`.
|
||||
Set this to `'poetry'` to invoke `'poetry` `run` `pyre'`.
|
||||
|
||||
|
||||
g:ale_python_pyre_use_global *g:ale_python_pyre_use_global*
|
||||
@@ -769,6 +886,15 @@ g:ale_python_pyre_auto_pipenv *g:ale_python_pyre_auto_pipenv*
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_pyre_auto_poetry *g:ale_python_pyre_auto_poetry*
|
||||
*b:ale_python_pyre_auto_poetry*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
pyright *ale-python-pyright*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user