2018-03-31 10:55:20 -04:00
|
|
|
===============================================================================
|
|
|
|
ALE Python Integration *ale-python-options*
|
|
|
|
|
|
|
|
|
2018-06-14 06:31:12 -04:00
|
|
|
===============================================================================
|
|
|
|
ALE Python Project Root Behavior *ale-python-root*
|
|
|
|
|
|
|
|
For some linters, ALE will search for a Python project root by looking at the
|
|
|
|
files in directories on or above where a file being checked is. ALE applies
|
|
|
|
the following methods, in order:
|
|
|
|
|
|
|
|
1. Find the first directory containing a common Python configuration file.
|
|
|
|
2. If no configuration file can be found, use the first directory which does
|
|
|
|
not contain a readable file named `__init__.py`.
|
|
|
|
|
|
|
|
ALE will look for configuration files with the following filenames. >
|
|
|
|
|
|
|
|
MANIFEST.in
|
|
|
|
setup.cfg
|
|
|
|
pytest.ini
|
|
|
|
tox.ini
|
|
|
|
mypy.ini
|
|
|
|
pycodestyle.cfg
|
|
|
|
flake8.cfg
|
2018-07-19 08:52:53 -04:00
|
|
|
Pipfile
|
|
|
|
Pipfile.lock
|
2018-06-14 06:31:12 -04:00
|
|
|
<
|
|
|
|
|
|
|
|
The first directory containing any of the files named above will be used.
|
|
|
|
|
|
|
|
|
2018-03-31 10:55:20 -04:00
|
|
|
===============================================================================
|
|
|
|
autopep8 *ale-python-autopep8*
|
|
|
|
|
|
|
|
g:ale_python_autopep8_executable *g:ale_python_autopep8_executable*
|
|
|
|
*b:ale_python_autopep8_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'autopep8'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_autopep8_options *g:ale_python_autopep8_options*
|
|
|
|
*b:ale_python_autopep8_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be set to pass extra options to autopep8.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_autopep8_use_global *g:ale_python_autopep8_use_global*
|
|
|
|
*b:ale_python_autopep8_use_global*
|
|
|
|
Type: |Number|
|
2018-06-14 06:31:12 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
black *ale-python-black*
|
|
|
|
|
|
|
|
g:ale_python_black_executable *g:ale_python_black_executable*
|
|
|
|
*b:ale_python_black_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'black'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
autopep8
|
|
|
|
g:ale_python_black_options *g:ale_python_black_options*
|
|
|
|
*b:ale_python_black_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be set to pass extra options to black.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_black_use_global *g:ale_python_black_use_global*
|
|
|
|
*b:ale_python_black_use_global*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
flake8 *ale-python-flake8*
|
|
|
|
|
2018-06-14 06:31:12 -04:00
|
|
|
g:ale_python_flake8_change_directory *g:ale_python_flake8_change_directory*
|
|
|
|
*b:ale_python_flake8_change_directory*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
|
|
|
|
|
|
|
If set to `1`, ALE will switch to the directory the Python file being
|
|
|
|
checked with `flake8` is in before checking it. This helps `flake8` find
|
|
|
|
configuration files more easily. This option can be turned off if you want
|
|
|
|
to control the directory Python is executed from yourself.
|
|
|
|
|
|
|
|
|
2018-03-31 10:55:20 -04:00
|
|
|
g:ale_python_flake8_executable *g:ale_python_flake8_executable*
|
|
|
|
*b:ale_python_flake8_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'flake8'`
|
|
|
|
|
2018-06-14 06:31:12 -04:00
|
|
|
This variable can be changed to modify the executable used for flake8. Set
|
|
|
|
this to `'pipenv'` to invoke `'pipenv` `run` `flake8'`.
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_flake8_options *g:ale_python_flake8_options*
|
|
|
|
*b:ale_python_flake8_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be changed to add command-line arguments to the flake8
|
|
|
|
invocation.
|
|
|
|
|
|
|
|
For example, to dynamically switch between programs targeting Python 2 and
|
|
|
|
Python 3, you may want to set >
|
|
|
|
|
|
|
|
let g:ale_python_flake8_executable = 'python3' " or 'python' for Python 2
|
|
|
|
let g:ale_python_flake8_options = '-m flake8'
|
|
|
|
<
|
|
|
|
after making sure it's installed for the appropriate Python versions (e.g.
|
|
|
|
`python3 -m pip install --user flake8`).
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_flake8_use_global *g:ale_python_flake8_use_global*
|
|
|
|
*b:ale_python_flake8_use_global*
|
|
|
|
Type: |Number|
|
2018-06-14 06:31:12 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
This variable controls whether or not ALE will search for flake8 in a
|
|
|
|
virtualenv directory first. If this variable is set to `1`, then ALE will
|
|
|
|
always use |g:ale_python_flake8_executable| for the executable path.
|
|
|
|
|
|
|
|
Both variables can be set with `b:` buffer variables instead.
|
|
|
|
|
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
isort *ale-python-isort*
|
|
|
|
|
|
|
|
g:ale_python_isort_executable *g:ale_python_isort_executable*
|
|
|
|
*b:ale_python_isort_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'isort'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
2018-07-19 08:52:53 -04:00
|
|
|
g:ale_python_isort_options *g:ale_python_isort_options*
|
|
|
|
*b:ale_python_isort_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be set to pass extra options to isort.
|
|
|
|
|
|
|
|
|
2018-03-31 10:55:20 -04:00
|
|
|
g:ale_python_isort_use_global *g:ale_python_isort_use_global*
|
|
|
|
*b:ale_python_isort_use_global*
|
|
|
|
Type: |Number|
|
2018-06-14 06:31:12 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
mypy *ale-python-mypy*
|
|
|
|
|
|
|
|
The minimum supported version of mypy that ALE supports is v0.4.4. This is
|
|
|
|
the first version containing the `--shadow-file` option ALE needs to be able
|
|
|
|
to check for errors while you type.
|
|
|
|
|
2018-06-14 06:31:12 -04:00
|
|
|
`mypy` will be run from a detected project root, per |ale-python-root|.
|
|
|
|
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
g:ale_python_mypy_executable *g:ale_python_mypy_executable*
|
|
|
|
*b:ale_python_mypy_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'mypy'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
2018-06-14 06:31:12 -04:00
|
|
|
Set this to `'pipenv'` to invoke `'pipenv` `run` `mypy'`.
|
|
|
|
|
2018-03-31 10:55:20 -04:00
|
|
|
g:ale_python_mypy_ignore_invalid_syntax
|
|
|
|
*g:ale_python_mypy_ignore_invalid_syntax*
|
|
|
|
*b:ale_python_mypy_ignore_invalid_syntax*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
When set to `1`, syntax error messages for mypy will be ignored. This option
|
|
|
|
can be used when running other Python linters which check for syntax errors,
|
|
|
|
as mypy can take a while to finish executing.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_mypy_options *g:ale_python_mypy_options*
|
|
|
|
*b:ale_python_mypy_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be changed to add command-line arguments to the mypy
|
|
|
|
invocation.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_mypy_use_global *g:ale_python_mypy_use_global*
|
|
|
|
*b:ale_python_mypy_use_global*
|
|
|
|
Type: |Number|
|
2018-06-14 06:31:12 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
prospector *ale-python-prospector*
|
|
|
|
|
|
|
|
g:ale_python_prospector_executable *g:ale_python_prospector_executable*
|
|
|
|
*b:ale_python_prospector_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'prospector'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
2018-06-14 06:31:12 -04:00
|
|
|
Set this to `'pipenv'` to invoke `'pipenv` `run` `prospector'`.
|
|
|
|
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
g:ale_python_prospector_options *g:ale_python_prospector_options*
|
|
|
|
*b:ale_python_prospector_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be changed to add command-line arguments to the prospector
|
|
|
|
invocation.
|
|
|
|
|
|
|
|
For example, to dynamically switch between programs targeting Python 2 and
|
|
|
|
Python 3, you may want to set >
|
|
|
|
|
|
|
|
let g:ale_python_prospector_executable = 'python3'
|
|
|
|
" or 'python' for Python 2
|
|
|
|
let g:ale_python_prospector_options = '--rcfile /path/to/.prospector.yaml'
|
|
|
|
" The virtualenv detection needs to be disabled.
|
|
|
|
let g:ale_python_prospector_use_global = 0
|
|
|
|
|
|
|
|
after making sure it's installed for the appropriate Python versions (e.g.
|
|
|
|
`python3 -m pip install --user prospector`).
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_prospector_use_global *g:ale_python_prospector_use_global*
|
|
|
|
*b:ale_python_prospector_use_global*
|
|
|
|
Type: |Number|
|
2018-06-14 06:31:12 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
pycodestyle *ale-python-pycodestyle*
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_pycodestyle_executable *g:ale_python_pycodestyle_executable*
|
|
|
|
*b:ale_python_pycodestyle_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'pycodestyle'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
2018-06-14 06:31:12 -04:00
|
|
|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pycodestyle'`.
|
|
|
|
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
g:ale_python_pycodestyle_options *g:ale_python_pycodestyle_options*
|
|
|
|
*b:ale_python_pycodestyle_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be changed to add command-line arguments to the
|
|
|
|
pycodestyle invocation.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_pycodestyle_use_global *g:ale_python_pycodestyle_use_global*
|
|
|
|
*b:ale_python_pycodestyle_use_global*
|
|
|
|
Type: |Number|
|
2018-06-14 06:31:12 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
2018-06-14 06:31:12 -04:00
|
|
|
===============================================================================
|
|
|
|
pyflakes *ale-python-pyflakes*
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_pyflakes_executable *g:ale_python_pyflakes_executable*
|
|
|
|
*b:ale_python_pyflakes_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'pyflakes'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pyflakes'`.
|
|
|
|
|
|
|
|
|
2018-03-31 10:55:20 -04:00
|
|
|
===============================================================================
|
|
|
|
pylint *ale-python-pylint*
|
|
|
|
|
2018-06-14 06:31:12 -04:00
|
|
|
g:ale_python_pylint_change_directory *g:ale_python_pylint_change_directory*
|
|
|
|
*b:ale_python_pylint_change_directory*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
|
|
|
|
|
|
|
If set to `1`, ALE will switch to the directory the Python file being
|
|
|
|
checked with `pylint` is in before checking it. This helps `pylint` find
|
|
|
|
configuration files more easily. This option can be turned off if you want
|
|
|
|
to control the directory Python is executed from yourself.
|
|
|
|
|
|
|
|
|
2018-03-31 10:55:20 -04:00
|
|
|
g:ale_python_pylint_executable *g:ale_python_pylint_executable*
|
|
|
|
*b:ale_python_pylint_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'pylint'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
2018-06-14 06:31:12 -04:00
|
|
|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pylint'`.
|
|
|
|
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
g:ale_python_pylint_options *g:ale_python_pylint_options*
|
|
|
|
*b:ale_python_pylint_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be changed to add command-line arguments to the pylint
|
|
|
|
invocation.
|
|
|
|
|
|
|
|
For example, to dynamically switch between programs targeting Python 2 and
|
|
|
|
Python 3, you may want to set >
|
|
|
|
|
|
|
|
let g:ale_python_pylint_executable = 'python3' " or 'python' for Python 2
|
|
|
|
let g:ale_python_pylint_options = '--rcfile /path/to/pylint.rc'
|
|
|
|
" The virtualenv detection needs to be disabled.
|
|
|
|
let g:ale_python_pylint_use_global = 0
|
|
|
|
|
|
|
|
after making sure it's installed for the appropriate Python versions (e.g.
|
|
|
|
`python3 -m pip install --user pylint`).
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_pylint_use_global *g:ale_python_pylint_use_global*
|
|
|
|
*b:ale_python_pylint_use_global*
|
|
|
|
Type: |Number|
|
2018-06-14 06:31:12 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
pyls *ale-python-pyls*
|
|
|
|
|
2018-06-14 06:31:12 -04:00
|
|
|
`pyls` will be run from a detected project root, per |ale-python-root|.
|
|
|
|
|
|
|
|
|
2018-03-31 10:55:20 -04:00
|
|
|
g:ale_python_pyls_executable *g:ale_python_pyls_executable*
|
|
|
|
*b:ale_python_pyls_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'pyls'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
2018-06-14 06:31:12 -04:00
|
|
|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pyls'`.
|
|
|
|
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
g:ale_python_pyls_use_global *g:ale_python_pyls_use_global*
|
|
|
|
*b:ale_python_pyls_use_global*
|
|
|
|
Type: |Number|
|
2018-06-14 06:31:12 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
2018-07-04 06:53:25 -04:00
|
|
|
===============================================================================
|
|
|
|
pyre *ale-python-pyre*
|
|
|
|
|
|
|
|
`pyre` will be run from a detected project root, per |ale-python-root|.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_pyre_executable *g:ale_python_pyre_executable*
|
|
|
|
*b:ale_python_pyre_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'pyre'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pyre'`.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_pyre_use_global *g:ale_python_pyre_use_global*
|
|
|
|
*b:ale_python_pyre_use_global*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
2018-07-30 17:18:16 -04:00
|
|
|
===============================================================================
|
|
|
|
vulture *ale-python-vulture*
|
|
|
|
|
|
|
|
g:ale_python_vulture_change_directory *g:ale_python_vulture_change_directory*
|
|
|
|
*b:ale_python_vulture_change_directory*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
|
|
|
|
|
|
|
If set to `1`, ALE will switch to the directory the Python file being
|
|
|
|
checked with `vulture` is in before checking it and check the whole project
|
|
|
|
directory instead of checking only the file opened in the current buffer.
|
|
|
|
This helps `vulture` to know the context and avoid false-negative results.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_vulture_executable *g:ale_python_vulture_executable*
|
|
|
|
*b:ale_python_vulture_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'vulture'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_vulture_use_global *g:ale_python_vulture_use_global*
|
|
|
|
*b:ale_python_vulture_use_global*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
2018-03-31 10:55:20 -04:00
|
|
|
===============================================================================
|
|
|
|
yapf *ale-python-yapf*
|
|
|
|
|
|
|
|
g:ale_python_yapf_executable *g:ale_python_yapf_executable*
|
|
|
|
*b:ale_python_yapf_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'yapf'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_yapf_use_global *g:ale_python_yapf_use_global*
|
|
|
|
*b:ale_python_yapf_use_global*
|
|
|
|
Type: |Number|
|
2018-06-14 06:31:12 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2018-03-31 10:55:20 -04:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|