Files
ale/doc/ale-python.txt
w0rp 400857d758 Implement Lua ALE setup & overhaul documentation
1. Add ale.setup and ale.setup.buffer for pure Lua configuration.
2. Update many global settings to use Booleans instead of numbers to
   make types easiert to work with in Lua.
3. Radically reformat documentation and fix errors to make
   documentation more usable for Neovim users.
2025-03-27 12:40:11 +00:00

2259 lines
90 KiB
Plaintext

===============================================================================
ALE Python Integration *ale-python-options*
*ale-options.python_auto_pipenv*
*g:ale_python_auto_pipenv*
*b:ale_python_auto_pipenv*
python_auto_pipenv
g:ale_python_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_auto_poetry*
*g:ale_python_auto_poetry*
*b:ale_python_auto_poetry*
python_auto_poetry
g: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-options.python_auto_uv*
*g:ale_python_auto_uv*
*b:ale_python_auto_uv*
python_auto_uv
g:ale_python_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
*ale-options.python_auto_virtualenv*
*g:ale_python_auto_virtualenv*
*b:ale_python_auto_virtualenv*
python_auto_virtualenv
g:ale_python_auto_virtualenv
Type: |Number|
Default: `0`
If set to `1`, ALE will automatically set environment variables for commands
such as `PATH` to attempt to make the experience of running Python linters
via virtualenv easier, without the need for another plugin or some
specialised setup.
===============================================================================
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
.pyre_configuration.local
mypy.ini
.mypy.ini
pycodestyle.cfg
.flake8
.flake8rc
pylama.ini
pylintrc
.pylintrc
pyrightconfig.json
pyrightconfig.toml
Pipfile
Pipfile.lock
poetry.lock
pyproject.toml
.tool-versions
<
The first directory containing any of the files named above will be used.
===============================================================================
autoflake *ale-python-autoflake*
*ale-options.python_autoflake_executable*
*g:ale_python_autoflake_executable*
*b:ale_python_autoflake_executable*
python_autoflake_executable
g:ale_python_autoflake_executable
Type: |String|
Default: `'autoflake'`
See |ale-integrations-local-executables|
*ale-options.python_autoflake_options*
*g:ale_python_autoflake_options*
*b:ale_python_autoflake_options*
python_autoflake_options
g:ale_python_autoflake_options
Type: |String|
Default: `''`
This variable can be set to pass extra options to autoflake.
*ale-options.python_autoflake_use_global*
*g:ale_python_autoflake_use_global*
*b:ale_python_autoflake_use_global*
python_autoflake_use_global
g:ale_python_autoflake_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_autoflake_auto_pipenv*
*g:ale_python_autoflake_auto_pipenv*
*b:ale_python_autoflake_auto_pipenv*
python_autoflake_auto_pipenv
g:ale_python_autoflake_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_autoflake_auto_poetry*
*g:ale_python_autoflake_auto_poetry*
*b:ale_python_autoflake_auto_poetry*
python_autoflake_auto_poetry
g:ale_python_autoflake_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-options.python_autoflake_auto_uv*
*g:ale_python_autoflake_auto_uv*
*b:ale_python_autoflake_auto_uv*
python_autoflake_auto_uv
g:ale_python_autoflake_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
autoimport *ale-python-autoimport*
*ale-options.python_autoimport_executable*
*g:ale_python_autoimport_executable*
*b:ale_python_autoimport_executable*
python_autoimport_executable
g:ale_python_autoimport_executable
Type: |String|
Default: `'autoimport'`
See |ale-integrations-local-executables|
*ale-options.python_autoimport_options*
*g:ale_python_autoimport_options*
*b:ale_python_autoimport_options*
python_autoimport_options
g:ale_python_autoimport_options
Type: |String|
Default: `''`
This variable can be set to pass extra options to autoimport.
*ale-options.python_autoimport_use_global*
*g:ale_python_autoimport_use_global*
*b:ale_python_autoimport_use_global*
python_autoimport_use_global
g:ale_python_autoimport_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_autoimport_auto_pipenv*
*g:ale_python_autoimport_auto_pipenv*
*b:ale_python_autoimport_auto_pipenv*
python_autoimport_auto_pipenv
g:ale_python_autoimport_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_autoimport_auto_poetry*
*g:ale_python_autoimport_auto_poetry*
*b:ale_python_autoimport_auto_poetry*
python_autoimport_auto_poetry
g:ale_python_autoimport_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-options.python_autoimport_auto_uv*
*g:ale_python_autoimport_auto_uv*
*b:ale_python_autoimport_auto_uv*
python_autoimport_auto_uv
g:ale_python_autoimport_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
autopep8 *ale-python-autopep8*
*ale-options.python_autopep8_executable*
*g:ale_python_autopep8_executable*
*b:ale_python_autopep8_executable*
python_autopep8_executable
g:ale_python_autopep8_executable
Type: |String|
Default: `'autopep8'`
See |ale-integrations-local-executables|
*ale-options.python_autopep8_options*
*g:ale_python_autopep8_options*
*b:ale_python_autopep8_options*
python_autopep8_options
g:ale_python_autopep8_options
Type: |String|
Default: `''`
This variable can be set to pass extra options to autopep8.
*ale-options.python_autopep8_use_global*
*g:ale_python_autopep8_use_global*
*b:ale_python_autopep8_use_global*
python_autopep8_use_global
g:ale_python_autopep8_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_autopep8_auto_pipenv*
*g:ale_python_autopep8_auto_pipenv*
*b:ale_python_autopep8_auto_pipenv*
python_autopep8_auto_pipenv
g:ale_python_autopep8_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_autopep8_auto_poetry*
*g:ale_python_autopep8_auto_poetry*
*b:ale_python_autopep8_auto_poetry*
python_autopep8_auto_poetry
g:ale_python_autopep8_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-options.python_autopep8_auto_uv*
*g:ale_python_autopep8_auto_uv*
*b:ale_python_autopep8_auto_uv*
python_autopep8_auto_uv
g:ale_python_autopep8_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
bandit *ale-python-bandit*
*ale-options.python_bandit_executable*
*g:ale_python_bandit_executable*
*b:ale_python_bandit_executable*
python_bandit_executable
g:ale_python_bandit_executable
Type: |String|
Default: `'bandit'`
See |ale-integrations-local-executables|
Set this to `'pipenv'` to invoke `'pipenv` `run` `bandit'`.
Set this to `'poetry'` to invoke `'poetry` `run` `bandit'`.
*ale-options.python_bandit_options*
*g:ale_python_bandit_options*
*b:ale_python_bandit_options*
python_bandit_options
g:ale_python_bandit_options
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to the
bandit invocation.
*ale-options.python_bandit_use_config*
*g:ale_python_bandit_use_config*
*b:ale_python_bandit_use_config*
python_bandit_use_config
g:ale_python_bandit_use_config
Type: |Number|
Default: `1`
If this variable is true and a `.bandit` file exists in the directory of the
file being checked or a parent directory, an `--ini` option is added to the
`bandit` command for the nearest `.bandit` file. Set this variable false to
disable adding the `--ini` option automatically.
*ale-options.python_bandit_use_global*
*g:ale_python_bandit_use_global*
*b:ale_python_bandit_use_global*
python_bandit_use_global
g:ale_python_bandit_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_bandit_auto_pipenv*
*g:ale_python_bandit_auto_pipenv*
*b:ale_python_bandit_auto_pipenv*
python_bandit_auto_pipenv
g:ale_python_bandit_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_bandit_auto_poetry*
*g:ale_python_bandit_auto_poetry*
*b:ale_python_bandit_auto_poetry*
python_bandit_auto_poetry
g: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.
*ale-options.python_bandit_auto_uv*
*g:ale_python_bandit_auto_uv*
*b:ale_python_bandit_auto_uv*
python_bandit_auto_uv
g:ale_python_bandit_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
black *ale-python-black*
*ale-options.python_black_executable*
*g:ale_python_black_executable*
*b:ale_python_black_executable*
python_black_executable
g:ale_python_black_executable
Type: |String|
Default: `'black'`
See |ale-integrations-local-executables|
*ale-options.python_black_options*
*g:ale_python_black_options*
*b:ale_python_black_options*
python_black_options
g:ale_python_black_options
Type: |String|
Default: `''`
This variable can be set to pass extra options to black.
*ale-options.python_black_use_global*
*g:ale_python_black_use_global*
*b:ale_python_black_use_global*
python_black_use_global
g:ale_python_black_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_black_auto_pipenv*
*g:ale_python_black_auto_pipenv*
*b:ale_python_black_auto_pipenv*
python_black_auto_pipenv
g:ale_python_black_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_black_auto_poetry*
*g:ale_python_black_auto_poetry*
*b:ale_python_black_auto_poetry*
python_black_auto_poetry
g: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.
*ale-options.python_black_auto_uv*
*g:ale_python_black_auto_uv*
*b:ale_python_black_auto_uv*
python_black_auto_uv
g:ale_python_black_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
*ale-options.python_black_change_directory*
*g:ale_python_black_change_directory*
*b:ale_python_black_change_directory*
python_black_change_directory
g:ale_python_black_change_directory
Type: |Number|
Default: `1`
If set to `1`, ALE will switch to the directory the Python file being
checked with `black` is in before checking it. This helps `black` find
configuration files more easily. This option can be turned off if you want
to control the directory Python is executed from yourself.
===============================================================================
cspell *ale-python-cspell*
See |ale-cspell-options|
===============================================================================
flake8 *ale-python-flake8*
*ale-options.python_flake8_change_directory*
*g:ale_python_flake8_change_directory*
*b:ale_python_flake8_change_directory*
python_flake8_change_directory
g:ale_python_flake8_change_directory
Type: |String|
Default: `'project'`
If set to `project`, ALE will switch to the project root before checking file.
If set to `file`, ALE will first switch to the directory containing the
Python file being checked with `flake8` before checking it.
You can turn it off with `off` option if you want to control the directory
Python is executed from yourself.
*ale-options.python_flake8_executable*
*g:ale_python_flake8_executable*
*b:ale_python_flake8_executable*
python_flake8_executable
g:ale_python_flake8_executable
Type: |String|
Default: `'flake8'`
This variable can be changed to modify the executable used for flake8. Set
this to `'pipenv'` to invoke `'pipenv` `run` `flake8'`. Set this to
`'poetry'` to invoke `'poetry` `run` `flake8'`.
*ale-options.python_flake8_options*
*g:ale_python_flake8_options*
*b:ale_python_flake8_options*
python_flake8_options
g: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`).
*ale-options.python_flake8_use_global*
*g:ale_python_flake8_use_global*
*b:ale_python_flake8_use_global*
python_flake8_use_global
g:ale_python_flake8_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
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.
*ale-options.python_flake8_auto_pipenv*
*g:ale_python_flake8_auto_pipenv*
*b:ale_python_flake8_auto_pipenv*
python_flake8_auto_pipenv
g:ale_python_flake8_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_flake8_auto_poetry*
*g:ale_python_flake8_auto_poetry*
*b:ale_python_flake8_auto_poetry*
python_flake8_auto_poetry
g: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.
*ale-options.python_flake8_auto_uv*
*g:ale_python_flake8_auto_uv*
*b:ale_python_flake8_auto_uv*
python_flake8_auto_uv
g:ale_python_flake8_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
flakehell *ale-python-flakehell*
*ale-options.python_flakehell_change_directory*
*g:ale_python_flakehell_change_directory*
*b:ale_python_flakehell_change_directory*
python_flakehell_change_directory
g:ale_python_flakehell_change_directory
Type: |String|
Default: `project`
If set to `project`, ALE will switch to the project root before checking file.
If set to `file`, ALE will switch to directory the Python file being
checked with `flakehell` is in before checking it.
You can turn it off with `off` option if you want to control the directory
Python is executed from yourself.
*ale-options.python_flakehell_executable*
*g:ale_python_flakehell_executable*
*b:ale_python_flakehell_executable*
python_flakehell_executable
g:ale_python_flakehell_executable
Type: |String|
Default: `'flakehell'`
This variable can be changed to modify the executable used for flakehell. Set
this to `'pipenv'` to invoke `'pipenv` `run` `flakehell'`. Set this to
`'poetry'` to invoke `'poetry` `run` `flakehell'`. Set this to `'python'` to
invoke `'python` `-m` `flakehell'`.
*ale-options.python_flakehell_options*
*g:ale_python_flakehell_options*
*b:ale_python_flakehell_options*
python_flakehell_options
g:ale_python_flakehell_options
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to the flakehell
lint invocation.
*ale-options.python_flakehell_use_global*
*g:ale_python_flakehell_use_global*
*b:ale_python_flakehell_use_global*
python_flakehell_use_global
g:ale_python_flakehell_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
This variable controls whether or not ALE will search for flakehell in a
virtualenv directory first. If this variable is set to `1`, then ALE will
always use |g:ale_python_flakehell_executable| for the executable path.
Both variables can be set with `b:` buffer variables instead.
*ale-options.python_flakehell_auto_pipenv*
*g:ale_python_flakehell_auto_pipenv*
*b:ale_python_flakehell_auto_pipenv*
python_flakehell_auto_pipenv
g:ale_python_flakehell_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_flakehell_auto_poetry*
*g:ale_python_flakehell_auto_poetry*
*b:ale_python_flakehell_auto_poetry*
python_flakehell_auto_poetry
g:ale_python_flakehell_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-options.python_flakehell_auto_uv*
*g:ale_python_flakehell_auto_uv*
*b:ale_python_flakehell_auto_uv*
python_flakehell_auto_uv
g:ale_python_flakehell_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
isort *ale-python-isort*
*ale-options.python_isort_executable*
*g:ale_python_isort_executable*
*b:ale_python_isort_executable*
python_isort_executable
g:ale_python_isort_executable
Type: |String|
Default: `'isort'`
See |ale-integrations-local-executables|
*ale-options.python_isort_options*
*g:ale_python_isort_options*
*b:ale_python_isort_options*
python_isort_options
g:ale_python_isort_options
Type: |String|
Default: `''`
This variable can be set to pass extra options to isort.
*ale-options.python_isort_use_global*
*g:ale_python_isort_use_global*
*b:ale_python_isort_use_global*
python_isort_use_global
g:ale_python_isort_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_isort_auto_pipenv*
*g:ale_python_isort_auto_pipenv*
*b:ale_python_isort_auto_pipenv*
python_isort_auto_pipenv
g:ale_python_isort_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_isort_auto_poetry*
*g:ale_python_isort_auto_poetry*
*b:ale_python_isort_auto_poetry*
python_isort_auto_poetry
g:ale_python_isort_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-options.python_isort_auto_uv*
*g:ale_python_isort_auto_uv*
*b:ale_python_isort_auto_uv*
python_isort_auto_uv
g:ale_python_isort_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
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.
`mypy` will be run from a detected project root, per |ale-python-root|.
*ale-options.python_mypy_auto_pipenv*
*g:ale_python_mypy_auto_pipenv*
*b:ale_python_mypy_auto_pipenv*
python_mypy_auto_pipenv
g:ale_python_mypy_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_mypy_auto_poetry*
*g:ale_python_mypy_auto_poetry*
*b:ale_python_mypy_auto_poetry*
python_mypy_auto_poetry
g: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.
*ale-options.python_mypy_auto_uv*
*g:ale_python_mypy_auto_uv*
*b:ale_python_mypy_auto_uv*
python_mypy_auto_uv
g:ale_python_mypy_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
*ale-options.python_mypy_executable*
*g:ale_python_mypy_executable*
*b:ale_python_mypy_executable*
python_mypy_executable
g:ale_python_mypy_executable
Type: |String|
Default: `'mypy'`
See |ale-integrations-local-executables|
Set this to `'pipenv'` to invoke `'pipenv` `run` `mypy'`.
Set this to `'poetry'` to invoke `'poetry` `run` `mypy'`.
*ale-options.python_mypy_ignore_invalid_syntax*
*g:ale_python_mypy_ignore_invalid_syntax*
*b:ale_python_mypy_ignore_invalid_syntax*
python_mypy_ignore_invalid_syntax
g: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.
*ale-options.python_mypy_options*
*g:ale_python_mypy_options*
*b:ale_python_mypy_options*
python_mypy_options
g:ale_python_mypy_options
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to the mypy
invocation.
*ale-options.python_mypy_show_notes*
*g:ale_python_mypy_show_notes*
*b:ale_python_mypy_show_notes*
python_mypy_show_notes
g:ale_python_mypy_show_notes
Type: |Number|
Default: `1`
If enabled, notes on lines will be displayed as 'I' (info) messages.
*ale-options.python_mypy_use_global*
*g:ale_python_mypy_use_global*
*b:ale_python_mypy_use_global*
python_mypy_use_global
g:ale_python_mypy_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
===============================================================================
prospector *ale-python-prospector*
*ale-options.python_prospector_executable*
*g:ale_python_prospector_executable*
*b:ale_python_prospector_executable*
python_prospector_executable
g:ale_python_prospector_executable
Type: |String|
Default: `'prospector'`
See |ale-integrations-local-executables|
Set this to `'pipenv'` to invoke `'pipenv` `run` `prospector'`.
Set this to `'poetry'` to invoke `'poetry` `run` `prospector'`.
*ale-options.python_prospector_options*
*g:ale_python_prospector_options*
*b:ale_python_prospector_options*
python_prospector_options
g: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`).
<
*ale-options.python_prospector_use_global*
*g:ale_python_prospector_use_global*
*b:ale_python_prospector_use_global*
python_prospector_use_global
g:ale_python_prospector_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_prospector_auto_pipenv*
*g:ale_python_prospector_auto_pipenv*
*b:ale_python_prospector_auto_pipenv*
python_prospector_auto_pipenv
g:ale_python_prospector_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_prospector_auto_poetry*
*g:ale_python_prospector_auto_poetry*
*b:ale_python_prospector_auto_poetry*
python_prospector_auto_poetry
g: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.
*ale-options.python_prospector_auto_uv*
*g:ale_python_prospector_auto_uv*
*b:ale_python_prospector_auto_uv*
python_prospector_auto_uv
g:ale_python_prospector_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
pycln *ale-python-pycln*
*ale-options.python_pycln_change_directory*
*g:ale_python_pycln_change_directory*
*b:ale_python_pycln_change_directory*
python_pycln_change_directory
g:ale_python_pycln_change_directory
Type: |Number|
Default: `1`
If set to `1`, `pycln` will be run from a detected project root, per
|ale-python-root|. if set to `0` or no project root detected,
`pycln` will be run from the buffer's directory.
*ale-options.python_pycln_executable*
*g:ale_python_pycln_executable*
*b:ale_python_pycln_executable*
python_pycln_executable
g:ale_python_pycln_executable
Type: |String|
Default: `'pycln'`
See |ale-integrations-local-executables|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pycln'`.
Set this to `'poetry'` to invoke `'poetry` `run` `pycln'`.
*ale-options.python_pycln_options*
*g:ale_python_pycln_options*
*b:ale_python_pycln_options*
python_pycln_options
g:ale_python_pycln_options
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to the pycln
invocation.
For example, to select/enable and/or disable some error codes,
you may want to set the following: >
let g:ale_python_pycln_options = '--expand-stars'
<
*ale-options.python_pycln_config_file*
*g:ale_python_pycln_config_file*
*b:ale_python_pycln_config_file*
python_pycln_config_file
g:ale_python_pycln_config_file
Type: |String|
Default: `''`
Use this variable to set the configuration file.
If `'--config' ` is found in the |g:ale_python_pycln_options|, then that
option value will override the value in this variable.
*ale-options.python_pycln_use_global*
*g:ale_python_pycln_use_global*
*b:ale_python_pycln_use_global*
python_pycln_use_global
g:ale_python_pycln_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_pycln_auto_pipenv*
*g:ale_python_pycln_auto_pipenv*
*b:ale_python_pycln_auto_pipenv*
python_pycln_auto_pipenv
g:ale_python_pycln_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_pycln_auto_poetry*
*g:ale_python_pycln_auto_poetry*
*b:ale_python_pycln_auto_poetry*
python_pycln_auto_poetry
g:ale_python_pycln_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-options.python_pycln_auto_uv*
*g:ale_python_pycln_auto_uv*
*b:ale_python_pycln_auto_uv*
python_pycln_auto_uv
g:ale_python_pycln_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
pycodestyle *ale-python-pycodestyle*
*ale-options.python_pycodestyle_executable*
*g:ale_python_pycodestyle_executable*
*b:ale_python_pycodestyle_executable*
python_pycodestyle_executable
g:ale_python_pycodestyle_executable
Type: |String|
Default: `'pycodestyle'`
See |ale-integrations-local-executables|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pycodestyle'`.
Set this to `'poetry'` to invoke `'poetry` `run` `pycodestyle'`.
*ale-options.python_pycodestyle_options*
*g:ale_python_pycodestyle_options*
*b:ale_python_pycodestyle_options*
python_pycodestyle_options
g:ale_python_pycodestyle_options
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to the
pycodestyle invocation.
*ale-options.python_pycodestyle_use_global*
*g:ale_python_pycodestyle_use_global*
*b:ale_python_pycodestyle_use_global*
python_pycodestyle_use_global
g:ale_python_pycodestyle_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_pycodestyle_auto_pipenv*
*g:ale_python_pycodestyle_auto_pipenv*
*b:ale_python_pycodestyle_auto_pipenv*
python_pycodestyle_auto_pipenv
g:ale_python_pycodestyle_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_pycodestyle_auto_poetry*
*g:ale_python_pycodestyle_auto_poetry*
*b:ale_python_pycodestyle_auto_poetry*
python_pycodestyle_auto_poetry
g: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.
*ale-options.python_pycodestyle_auto_uv*
*g:ale_python_pycodestyle_auto_uv*
*b:ale_python_pycodestyle_auto_uv*
python_pycodestyle_auto_uv
g:ale_python_pycodestyle_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
pydocstyle *ale-python-pydocstyle*
*ale-options.python_pydocstyle_executable*
*g:ale_python_pydocstyle_executable*
*b:ale_python_pydocstyle_executable*
python_pydocstyle_executable
g:ale_python_pydocstyle_executable
Type: |String|
Default: `'pydocstyle'`
See |ale-integrations-local-executables|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pydocstyle'`.
Set this to `'poetry'` to invoke `'poetry` `run` `pydocstyle'`.
*ale-options.python_pydocstyle_options*
*g:ale_python_pydocstyle_options*
*b:ale_python_pydocstyle_options*
python_pydocstyle_options
g:ale_python_pydocstyle_options
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to the
pydocstyle invocation.
*ale-options.python_pydocstyle_use_global*
*g:ale_python_pydocstyle_use_global*
*b:ale_python_pydocstyle_use_global*
python_pydocstyle_use_global
g:ale_python_pydocstyle_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_pydocstyle_auto_pipenv*
*g:ale_python_pydocstyle_auto_pipenv*
*b:ale_python_pydocstyle_auto_pipenv*
python_pydocstyle_auto_pipenv
g:ale_python_pydocstyle_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_pydocstyle_auto_poetry*
*g:ale_python_pydocstyle_auto_poetry*
*b:ale_python_pydocstyle_auto_poetry*
python_pydocstyle_auto_poetry
g: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.
*ale-options.python_pydocstyle_auto_uv*
*g:ale_python_pydocstyle_auto_uv*
*b:ale_python_pydocstyle_auto_uv*
python_pydocstyle_auto_uv
g:ale_python_pydocstyle_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
pyflakes *ale-python-pyflakes*
*ale-options.python_pyflakes_executable*
*g:ale_python_pyflakes_executable*
*b:ale_python_pyflakes_executable*
python_pyflakes_executable
g:ale_python_pyflakes_executable
Type: |String|
Default: `'pyflakes'`
See |ale-integrations-local-executables|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pyflakes'`.
Set this to `'poetry'` to invoke `'poetry` `run` `pyflakes'`.
*ale-options.python_pyflakes_auto_pipenv*
*g:ale_python_pyflakes_auto_pipenv*
*b:ale_python_pyflakes_auto_pipenv*
python_pyflakes_auto_pipenv
g:ale_python_pyflakes_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_pyflakes_auto_poetry*
*g:ale_python_pyflakes_auto_poetry*
*b:ale_python_pyflakes_auto_poetry*
python_pyflakes_auto_poetry
g: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.
*ale-options.python_pyflakes_auto_uv*
*g:ale_python_pyflakes_auto_uv*
*b:ale_python_pyflakes_auto_uv*
python_pyflakes_auto_uv
g:ale_python_pyflakes_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
pyflyby *ale-python-pyflyby*
*ale-options.python_pyflyby_executable*
*g:ale_python_pyflyby_executable*
*b:ale_python_pyflyby_executable*
python_pyflyby_executable
g:ale_python_pyflyby_executable
Type: |String|
Default: `'tidy-imports'`
See |ale-integrations-local-executables|
*ale-options.python_pyflyby_options*
*g:ale_python_pyflyby_options*
*b:ale_python_pyflyby_options*
python_pyflyby_options
g:ale_python_pyflyby_options
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to the pyflyby
tidy-imports invocation.
*ale-options.python_pyflyby_use_global*
*g:ale_python_pyflyby_use_global*
*b:ale_python_pyflyby_use_global*
python_pyflyby_use_global
g:ale_python_pyflyby_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_pyflyby_auto_pipenv*
*g:ale_python_pyflyby_auto_pipenv*
*b:ale_python_pyflyby_auto_pipenv*
python_pyflyby_auto_pipenv
g:ale_python_pyflyby_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_pyflyby_auto_poetry*
*g:ale_python_pyflyby_auto_poetry*
*b:ale_python_pyflyby_auto_poetry*
python_pyflyby_auto_poetry
g:ale_python_pyflyby_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-options.python_pyflyby_auto_uv*
*g:ale_python_pyflyby_auto_uv*
*b:ale_python_pyflyby_auto_uv*
python_pyflyby_auto_uv
g:ale_python_pyflyby_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
pylama *ale-python-pylama*
*ale-options.python_pylama_change_directory*
*g:ale_python_pylama_change_directory*
*b:ale_python_pylama_change_directory*
python_pylama_change_directory
g:ale_python_pylama_change_directory
Type: |Number|
Default: `1`
If set to `1`, `pylama` will be run from a detected project root, per
|ale-python-root|. This is useful because `pylama` only searches for
configuration files in its current directory and applies file masks using
paths relative to its current directory. This option can be turned off if
you want to control the directory in which `pylama` is executed.
*ale-options.python_pylama_executable*
*g:ale_python_pylama_executable*
*b:ale_python_pylama_executable*
python_pylama_executable
g:ale_python_pylama_executable
Type: |String|
Default: `'pylama'`
This variable can be changed to modify the executable used for pylama. Set
this to `'pipenv'` to invoke `'pipenv` `run` `pylama'`. Set this to
`'poetry'` to invoke `'poetry` `run` `pylama'`.
*ale-options.python_pylama_options*
*g:ale_python_pylama_options*
*b:ale_python_pylama_options*
python_pylama_options
g:ale_python_pylama_options
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to the pylama
invocation.
*ale-options.python_pylama_use_global*
*g:ale_python_pylama_use_global*
*b:ale_python_pylama_use_global*
python_pylama_use_global
g:ale_python_pylama_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
This variable controls whether or not ALE will search for pylama in a
virtualenv directory first. If this variable is set to `1`, then ALE will
always use |g:ale_python_pylama_executable| for the executable path.
Both variables can be set with `b:` buffer variables instead.
*ale-options.python_pylama_auto_pipenv*
*g:ale_python_pylama_auto_pipenv*
*b:ale_python_pylama_auto_pipenv*
python_pylama_auto_pipenv
g:ale_python_pylama_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_pylama_auto_poetry*
*g:ale_python_pylama_auto_poetry*
*b:ale_python_pylama_auto_poetry*
python_pylama_auto_poetry
g: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.
*ale-options.python_pylama_auto_uv*
*g:ale_python_pylama_auto_uv*
*b:ale_python_pylama_auto_uv*
python_pylama_auto_uv
g:ale_python_pylama_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
pylint *ale-python-pylint*
*ale-options.python_pylint_change_directory*
*g:ale_python_pylint_change_directory*
*b:ale_python_pylint_change_directory*
python_pylint_change_directory
g:ale_python_pylint_change_directory
Type: |Number|
Default: `1`
If set to `1`, `pylint` will be run from a detected project root, per
|ale-python-root|. Since `pylint` only checks for `pylintrc` in the packages
above its current directory before falling back to user and global `pylintrc`
files, this is necessary for `pylint` to use a project `pylintrc` file, if
present. This option can be turned off if you want to control the directory
Python is executed from yourself.
*ale-options.python_pylint_executable*
*g:ale_python_pylint_executable*
*b:ale_python_pylint_executable*
python_pylint_executable
g:ale_python_pylint_executable
Type: |String|
Default: `'pylint'`
See |ale-integrations-local-executables|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pylint'`.
Set this to `'poetry'` to invoke `'poetry` `run` `pylint'`.
*ale-options.python_pylint_options*
*g:ale_python_pylint_options*
*b:ale_python_pylint_options*
python_pylint_options
g: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`).
<
*ale-options.python_pylint_use_global*
*g:ale_python_pylint_use_global*
*b:ale_python_pylint_use_global*
python_pylint_use_global
g:ale_python_pylint_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_pylint_auto_pipenv*
*g:ale_python_pylint_auto_pipenv*
*b:ale_python_pylint_auto_pipenv*
python_pylint_auto_pipenv
g:ale_python_pylint_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_pylint_auto_poetry*
*g:ale_python_pylint_auto_poetry*
*b:ale_python_pylint_auto_poetry*
python_pylint_auto_poetry
g: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.
*ale-options.python_pylint_auto_uv*
*g:ale_python_pylint_auto_uv*
*b:ale_python_pylint_auto_uv*
python_pylint_auto_uv
g:ale_python_pylint_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
*ale-options.python_pylint_use_msg_id*
*g:ale_python_pylint_use_msg_id*
*b:ale_python_pylint_use_msg_id*
python_pylint_use_msg_id
g:ale_python_pylint_use_msg_id
Type: |Number|
Default: `0`
Use message for output (e.g. I0011) instead of symbolic name of the message
(e.g. locally-disabled).
===============================================================================
pylsp *ale-python-pylsp*
`pylsp` will be run from a detected project root, per |ale-python-root|.
*ale-options.python_pylsp_executable*
*g:ale_python_pylsp_executable*
*b:ale_python_pylsp_executable*
python_pylsp_executable
g:ale_python_pylsp_executable
Type: |String|
Default: `'pylsp'`
See |ale-integrations-local-executables|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pylsp'`.
Set this to `'poetry'` to invoke `'poetry` `run` `pyls'`.
*ale-options.python_pylsp_use_global*
*g:ale_python_pylsp_use_global*
*b:ale_python_pylsp_use_global*
python_pylsp_use_global
g:ale_python_pylsp_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_pylsp_auto_pipenv*
*g:ale_python_pylsp_auto_pipenv*
*b:ale_python_pylsp_auto_pipenv*
python_pylsp_auto_pipenv
g:ale_python_pylsp_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_pylsp_auto_poetry*
*g:ale_python_pylsp_auto_poetry*
*b:ale_python_pylsp_auto_poetry*
python_pylsp_auto_poetry
g: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.
*ale-options.python_pylsp_auto_uv*
*g:ale_python_pylsp_auto_uv*
*b:ale_python_pylsp_auto_uv*
python_pylsp_auto_uv
g:ale_python_pylsp_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
*ale-options.python_pylsp_config*
*g:ale_python_pylsp_config*
*b:ale_python_pylsp_config*
python_pylsp_config
g:ale_python_pylsp_config
Type: |Dictionary|
Default: `{}`
Dictionary with configuration settings for pylsp. For example, to disable
the pycodestyle linter: >
let g:ale_python_pylsp_config = {
\ 'pylsp': {
\ 'plugins': {
\ 'pycodestyle': {
\ 'enabled': v:false
\ }
\ }
\ },
\}
<
*ale-options.python_pylsp_options*
*g:ale_python_pylsp_options*
*b:ale_python_pylsp_options*
python_pylsp_options
g:ale_python_pylsp_options
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to the pylsp
invocation. Note that this is not the same thing as ale_python_pylsp_config,
which allows configuration of how pylsp functions; this is intended to
provide flexibility in how the pylsp command is invoked.
For example, if you had installed `pylsp` but your `pylsp` executable was not
on your `PATH` for some reason, an alternative way to run the pylsp server
would be:
let g:ale_python_pylsp_executable = 'python3'
let g:ale_python_pylsp_options = '-m pylsp'
An example strategy for installing `pylsp`:
`python3 -m pip install --user pylsp`
===============================================================================
pyre *ale-python-pyre*
`pyre` will be run from a detected project root, per |ale-python-root|.
*ale-options.python_pyre_executable*
*g:ale_python_pyre_executable*
*b:ale_python_pyre_executable*
python_pyre_executable
g:ale_python_pyre_executable
Type: |String|
Default: `'pyre'`
See |ale-integrations-local-executables|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pyre'`.
Set this to `'poetry'` to invoke `'poetry` `run` `pyre'`.
*ale-options.python_pyre_use_global*
*g:ale_python_pyre_use_global*
*b:ale_python_pyre_use_global*
python_pyre_use_global
g:ale_python_pyre_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_pyre_auto_pipenv*
*g:ale_python_pyre_auto_pipenv*
*b:ale_python_pyre_auto_pipenv*
python_pyre_auto_pipenv
g:ale_python_pyre_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_pyre_auto_poetry*
*g:ale_python_pyre_auto_poetry*
*b:ale_python_pyre_auto_poetry*
python_pyre_auto_poetry
g: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.
*ale-options.python_pyre_auto_uv*
*g:ale_python_pyre_auto_uv*
*b:ale_python_pyre_auto_uv*
python_pyre_auto_uv
g:ale_python_pyre_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
pyright *ale-python-pyright*
The `pyright` linter requires a recent version of `pyright` which includes
the `pyright-langserver` executable. You can install `pyright` on your system
through `npm` with `sudo npm install -g pyright` or similar.
Refer to their README for installation instructions:
https://github.com/Microsoft/pyright
`pyright` needs to know the path to your Python executable and probably a
virtualenv to run. ALE will try to detect these automatically.
See |g:ale_python_pyright_config|.
*ale-options.python_pyright_executable*
*g:ale_python_pyright_executable*
*b:ale_python_pyright_executable*
python_pyright_executable
g:ale_python_pyright_executable
Type: |String|
Default: `'pyright-langserver'`
The executable for running `pyright`, which is typically installed globally.
*ale-options.python_pyright_config*
*g:ale_python_pyright_config*
*b:ale_python_pyright_config*
python_pyright_config
g:ale_python_pyright_config
Type: |Dictionary|
Default: `{}`
Settings for configuring the `pyright` language server.
See pyright's documentation for a full list of options:
https://github.com/microsoft/pyright/blob/master/docs/settings.md
ALE will automatically try to set defaults for `venvPath` and `pythonPath`
so your project can automatically be checked with the right libraries.
You can override these settings with whatever you want in your ftplugin
file like so: >
let b:ale_python_pyright_config = {
\ 'python': {
\ 'pythonPath': '/bin/python',
\ 'venvPath': '/other/dir',
\ },
\}
<
If `venvPath` is set, but `pythonPath` is not,
ALE will use `venvPath . '/bin/python'` or similar as `pythonPath`.
A commonly used setting for `pyright` is disabling language services
apart from type checking and "hover" (|ale-hover|), you can set this
setting like so, or use whatever other settings you want: >
let b:ale_python_pyright_config = {
\ 'pyright': {
\ 'disableLanguageServices': v:true,
\ },
\}
<
*ale-options.python_pyright_auto_pipenv*
*g:ale_python_pyright_auto_pipenv*
*b:ale_python_pyright_auto_pipenv*
python_pyright_auto_pipenv
g:ale_python_pyright_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_pyright_auto_poetry*
*g:ale_python_pyright_auto_poetry*
*b:ale_python_pyright_auto_poetry*
python_pyright_auto_poetry
g:ale_python_pyright_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-options.python_pyright_auto_uv*
*g:ale_python_pyright_auto_uv*
*b:ale_python_pyright_auto_uv*
python_pyright_auto_uv
g:ale_python_pyright_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
refurb *ale-python-refurb*
*ale-options.python_refurb_change_directory*
*g:ale_python_refurb_change_directory*
*b:ale_python_refurb_change_directory*
python_refurb_change_directory
g:ale_python_refurb_change_directory
Type: |Number|
Default: `1`
If set to `1`, `refurb` will be run from a detected project root, per
|ale-python-root|. if set to `0` or no project root detected,
`refurb` will be run from the buffer's directory.
*ale-options.python_refurb_executable*
*g:ale_python_refurb_executable*
*b:ale_python_refurb_executable*
python_refurb_executable
g:ale_python_refurb_executable
Type: |String|
Default: `'refurb'`
See |ale-integrations-local-executables|
Set this to `'pipenv'` to invoke `'pipenv` `run` `refurb'`.
Set this to `'poetry'` to invoke `'poetry` `run` `refurb'`.
*ale-options.python_refurb_options*
*g:ale_python_refurb_options*
*b:ale_python_refurb_options*
python_refurb_options
g:ale_python_refurb_options
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to the refurb
invocation.
For example, to select/enable and/or disable some error codes,
you may want to set >
let g:ale_python_refurb_options = '--ignore 100'
<
*ale-options.python_refurb_use_global*
*g:ale_python_refurb_use_global*
*b:ale_python_refurb_use_global*
python_refurb_use_global
g:ale_python_refurb_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_refurb_auto_pipenv*
*g:ale_python_refurb_auto_pipenv*
*b:ale_python_refurb_auto_pipenv*
python_refurb_auto_pipenv
g:ale_python_refurb_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_refurb_auto_poetry*
*g:ale_python_refurb_auto_poetry*
*b:ale_python_refurb_auto_poetry*
python_refurb_auto_poetry
g:ale_python_refurb_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-options.python_refurb_auto_uv*
*g:ale_python_refurb_auto_uv*
*b:ale_python_refurb_auto_uv*
python_refurb_auto_uv
g:ale_python_refurb_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
reorder-python-imports *ale-python-reorder_python_imports*
*ale-options.python_reorder_python_imports_executable*
*g:ale_python_reorder_python_imports_executable*
*b:ale_python_reorder_python_imports_executable*
python_reorder_python_imports_executable
g:ale_python_reorder_python_imports_executable
Type: |String|
Default: `'reorder-python-imports'`
See |ale-integrations-local-executables|
*ale-options.python_reorder_python_imports_options*
*g:ale_python_reorder_python_imports_options*
*b:ale_python_reorder_python_imports_options*
python_reorder_python_imports_options
g:ale_python_reorder_python_imports_options
Type: |String|
Default: `''`
This variable can be set to pass extra options to reorder-python-imports.
*ale-options.python_reorder_python_imports_use_global*
*g:ale_python_reorder_python_imports_use_global*
*b:ale_python_reorder_python_imports_use_global*
python_reorder_python_imports_use_global
g:ale_python_reorder_python_imports_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_reorder_python_imports_auto_pipenv*
*g:ale_python_reorder_python_imports_auto_pipenv*
*b:ale_python_reorder_python_imports_auto_pipenv*
python_reorder_python_imports_auto_pipenv
g:ale_python_reorder_python_imports_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_reorder_python_imports_auto_poetry*
*g:ale_python_reorder_python_imports_auto_poetry*
*b:ale_python_reorder_python_imports_auto_poetry*
python_reorder_python_imports_auto_poetry
g:ale_python_reorder_python_imports_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-options.python_reorder_python_imports_auto_uv*
*g:ale_python_reorder_python_imports_auto_uv*
*b:ale_python_reorder_python_imports_auto_uv*
python_reorder_python_imports_auto_uv
g:ale_python_reorder_python_imports_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
ruff *ale-python-ruff*
*ale-options.python_ruff_change_directory*
*g:ale_python_ruff_change_directory*
*b:ale_python_ruff_change_directory*
python_ruff_change_directory
g:ale_python_ruff_change_directory
Type: |Number|
Default: `1`
If set to `1`, `ruff` will be run from a detected project root, per
|ale-python-root|. if set to `0` or no project root detected,
`ruff` will be run from the buffer's directory.
*ale-options.python_ruff_executable*
*g:ale_python_ruff_executable*
*b:ale_python_ruff_executable*
python_ruff_executable
g:ale_python_ruff_executable
Type: |String|
Default: `'ruff'`
See |ale-integrations-local-executables|
Set this to `'pipenv'` to invoke `'pipenv` `run` `ruff'`.
Set this to `'poetry'` to invoke `'poetry` `run` `ruff'`.
*ale-options.python_ruff_options*
*g:ale_python_ruff_options*
*b:ale_python_ruff_options*
python_ruff_options
g:ale_python_ruff_options
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to the ruff
invocation.
For example, to select/enable and/or disable some error codes,
you may want to set: >
let g:ale_python_ruff_options = '--ignore F401'
<
*ale-options.python_ruff_use_global*
*g:ale_python_ruff_use_global*
*b:ale_python_ruff_use_global*
python_ruff_use_global
g:ale_python_ruff_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_ruff_auto_pipenv*
*g:ale_python_ruff_auto_pipenv*
*b:ale_python_ruff_auto_pipenv*
python_ruff_auto_pipenv
g:ale_python_ruff_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_ruff_auto_poetry*
*g:ale_python_ruff_auto_poetry*
*b:ale_python_ruff_auto_poetry*
python_ruff_auto_poetry
g:ale_python_ruff_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-options.python_ruff_auto_uv*
*g:ale_python_ruff_auto_uv*
*b:ale_python_ruff_auto_uv*
python_ruff_auto_uv
g:ale_python_ruff_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
ruff-format *ale-python-ruff-format*
*ale-options.python_ruff_format_change_directory*
*g:ale_python_ruff_format_change_directory*
*b:ale_python_ruff_format_change_directory*
python_ruff_format_change_directory
g:ale_python_ruff_format_change_directory
Type: |Number|
Default: `1`
If set to `1`, `ruff` will be run from a detected project root, per
|ale-python-root|. if set to `0` or no project root detected,
`ruff` will be run from the buffer's directory.
*ale-options.python_ruff_format_executable*
*g:ale_python_ruff_format_executable*
*b:ale_python_ruff_format_executable*
python_ruff_format_executable
g:ale_python_ruff_format_executable
Type: |String|
Default: `'ruff'`
See |ale-integrations-local-executables|
Set this to `'pipenv'` to invoke `'pipenv` `run` `ruff'`.
Set this to `'poetry'` to invoke `'poetry` `run` `ruff'`.
*ale-options.python_ruff_format_options*
*g:ale_python_ruff_format_options*
*b:ale_python_ruff_format_options*
python_ruff_format_options
g:ale_python_ruff_format_options
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to the ruff
invocation.
For example, to select/enable and/or disable some error codes,
you may want to set >
let g:ale_python_ruff_format_options = '--ignore F401'
<
*ale-options.python_ruff_format_use_global*
*g:ale_python_ruff_format_use_global*
*b:ale_python_ruff_format_use_global*
python_ruff_format_use_global
g:ale_python_ruff_format_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_ruff_format_auto_pipenv*
*g:ale_python_ruff_format_auto_pipenv*
*b:ale_python_ruff_format_auto_pipenv*
python_ruff_format_auto_pipenv
g:ale_python_ruff_format_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_ruff_format_auto_poetry*
*g:ale_python_ruff_format_auto_poetry*
*b:ale_python_ruff_format_auto_poetry*
python_ruff_format_auto_poetry
g:ale_python_ruff_format_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-options.python_ruff_format_auto_uv*
*g:ale_python_ruff_format_auto_uv*
*b:ale_python_ruff_format_auto_uv*
python_ruff_format_auto_uv
g:ale_python_ruff_format_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
unimport *ale-python-unimport*
`unimport` will be run from a detected project root, per |ale-python-root|.
*ale-options.python_unimport_auto_pipenv*
*g:ale_python_unimport_auto_pipenv*
*b:ale_python_unimport_auto_pipenv*
python_unimport_auto_pipenv
g:ale_python_unimport_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_unimport_auto_poetry*
*g:ale_python_unimport_auto_poetry*
*b:ale_python_unimport_auto_poetry*
python_unimport_auto_poetry
g:ale_python_unimport_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-options.python_unimport_auto_uv*
*g:ale_python_unimport_auto_uv*
*b:ale_python_unimport_auto_uv*
python_unimport_auto_uv
g:ale_python_unimport_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
*ale-options.python_unimport_executable*
*g:ale_python_unimport_executable*
*b:ale_python_unimport_executable*
python_unimport_executable
g:ale_python_unimport_executable
Type: |String|
Default: `'unimport'`
See |ale-integrations-local-executables|
Set this to `'pipenv'` to invoke `'pipenv` `run` `unimport'`.
Set this to `'poetry'` to invoke `'poetry` `run` `unimport'`.
*ale-options.python_unimport_options*
*g:ale_python_unimport_options*
*b:ale_python_unimport_options*
python_unimport_options
g:ale_python_unimport_options
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to the unimport
invocation.
*ale-options.python_unimport_use_global*
*g:ale_python_unimport_use_global*
*b:ale_python_unimport_use_global*
python_unimport_use_global
g:ale_python_unimport_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
===============================================================================
vulture *ale-python-vulture*
*ale-options.python_vulture_change_directory*
*g:ale_python_vulture_change_directory*
*b:ale_python_vulture_change_directory*
python_vulture_change_directory
g: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.
*ale-options.python_vulture_executable*
*g:ale_python_vulture_executable*
*b:ale_python_vulture_executable*
python_vulture_executable
g:ale_python_vulture_executable
Type: |String|
Default: `'vulture'`
See |ale-integrations-local-executables|
*ale-options.python_vulture_options*
*g:ale_python_vulture_options*
*b:ale_python_vulture_options*
python_vulture_options
g:ale_python_vulture_options
Type: |String|
Default: `''`
This variable can be changed to add command-line arguments to the vulture
invocation.
*ale-options.python_vulture_use_global*
*g:ale_python_vulture_use_global*
*b:ale_python_vulture_use_global*
python_vulture_use_global
g:ale_python_vulture_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_vulture_auto_pipenv*
*g:ale_python_vulture_auto_pipenv*
*b:ale_python_vulture_auto_pipenv*
python_vulture_auto_pipenv
g:ale_python_vulture_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_vulture_auto_poetry*
*g:ale_python_vulture_auto_poetry*
*b:ale_python_vulture_auto_poetry*
python_vulture_auto_poetry
g:ale_python_vulture_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-options.python_vulture_auto_uv*
*g:ale_python_vulture_auto_uv*
*b:ale_python_vulture_auto_uv*
python_vulture_auto_uv
g:ale_python_vulture_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
yapf *ale-python-yapf*
*ale-options.python_yapf_executable*
*g:ale_python_yapf_executable*
*b:ale_python_yapf_executable*
python_yapf_executable
g:ale_python_yapf_executable
Type: |String|
Default: `'yapf'`
See |ale-integrations-local-executables|
*ale-options.python_yapf_use_global*
*g:ale_python_yapf_use_global*
*b:ale_python_yapf_use_global*
python_yapf_use_global
g:ale_python_yapf_use_global
Type: |Number|
Default: `get(g:, 'ale_use_global_executables', 0)`
See |ale-integrations-local-executables|
*ale-options.python_yapf_auto_pipenv*
*g:ale_python_yapf_auto_pipenv*
*b:ale_python_yapf_auto_pipenv*
python_yapf_auto_pipenv
g:ale_python_yapf_auto_pipenv
Type: |Number|
Default: `0`
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
if true. This is overridden by a manually-set executable.
*ale-options.python_yapf_auto_poetry*
*g:ale_python_yapf_auto_poetry*
*b:ale_python_yapf_auto_poetry*
python_yapf_auto_poetry
g:ale_python_yapf_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-options.python_yapf_auto_uv*
*g:ale_python_yapf_auto_uv*
*b:ale_python_yapf_auto_uv*
python_yapf_auto_uv
g:ale_python_yapf_auto_uv
Type: |Number|
Default: `0`
Set the executable to `uv` if true. This is overridden by a manually-set
executable.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: