2017-03-28 18:25:44 -04:00
|
|
|
===============================================================================
|
|
|
|
ALE Python Integration *ale-python-options*
|
|
|
|
|
|
|
|
|
2018-09-15 21:38:26 -04:00
|
|
|
g:ale_python_auto_pipenv *g:ale_python_auto_pipenv*
|
|
|
|
*b: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.
|
|
|
|
|
2018-05-30 15:09:33 -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
|
2019-05-18 09:42:19 -04:00
|
|
|
.flake8
|
2018-08-01 23:07:11 -04:00
|
|
|
.flake8rc
|
2019-02-08 16:44:34 -05:00
|
|
|
pylama.ini
|
2019-02-17 12:12:24 -05:00
|
|
|
pylintrc
|
|
|
|
.pylintrc
|
2018-07-15 14:26:45 -04:00
|
|
|
Pipfile
|
|
|
|
Pipfile.lock
|
2018-05-30 15:09:33 -04:00
|
|
|
<
|
|
|
|
|
|
|
|
The first directory containing any of the files named above will be used.
|
|
|
|
|
|
|
|
|
2017-07-08 09:17:26 -04:00
|
|
|
===============================================================================
|
2017-06-18 06:03:31 -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-04-09 14:11:20 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2017-06-18 06:03:31 -04:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
2019-01-26 05:48:03 -05:00
|
|
|
===============================================================================
|
|
|
|
bandit *ale-python-bandit*
|
|
|
|
|
|
|
|
g:ale_python_bandit_executable *g:ale_python_bandit_executable*
|
|
|
|
*b:ale_python_bandit_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'bandit'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
Set this to `'pipenv'` to invoke `'pipenv` `run` `bandit'`.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_bandit_options *g:ale_python_bandit_options*
|
|
|
|
*b:ale_python_bandit_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be changed to add command-line arguments to the
|
|
|
|
bandit invocation.
|
|
|
|
|
|
|
|
|
2019-02-17 16:11:56 -05:00
|
|
|
g:ale_python_bandit_use_config *g:ale_python_bandit_use_config*
|
|
|
|
*b: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.
|
|
|
|
|
|
|
|
|
2019-01-26 05:48:03 -05:00
|
|
|
g:ale_python_bandit_use_global *g:ale_python_bandit_use_global*
|
|
|
|
*b:ale_python_bandit_use_global*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_bandit_auto_pipenv *g:ale_python_bandit_auto_pipenv*
|
|
|
|
*b: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.
|
|
|
|
|
|
|
|
|
2018-04-06 05:08:25 -04:00
|
|
|
===============================================================================
|
|
|
|
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|
|
|
|
|
|
2019-01-03 15:33:59 -05:00
|
|
|
|
2018-04-06 05:08:25 -04:00
|
|
|
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|
|
2018-04-09 14:11:20 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2018-04-06 05:08:25 -04:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
2019-01-03 15:33:59 -05:00
|
|
|
|
2018-10-10 09:05:52 -04:00
|
|
|
g:ale_python_black_auto_pipenv *g:ale_python_black_auto_pipenv*
|
|
|
|
*b: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.
|
|
|
|
|
2019-01-30 10:57:58 -05:00
|
|
|
g:ale_python_black_change_directory *g:ale_python_black_change_directory*
|
|
|
|
*b: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.
|
|
|
|
|
2018-04-06 05:08:25 -04:00
|
|
|
|
2017-07-08 09:17:26 -04:00
|
|
|
===============================================================================
|
2017-03-28 18:25:44 -04:00
|
|
|
flake8 *ale-python-flake8*
|
|
|
|
|
2018-05-28 11:34:54 -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.
|
|
|
|
|
|
|
|
|
2017-03-28 18:25:44 -04:00
|
|
|
g:ale_python_flake8_executable *g:ale_python_flake8_executable*
|
2017-04-27 17:04:34 -04:00
|
|
|
*b:ale_python_flake8_executable*
|
2017-03-28 18:25:44 -04:00
|
|
|
Type: |String|
|
|
|
|
Default: `'flake8'`
|
|
|
|
|
2018-06-04 22:43:02 -04:00
|
|
|
This variable can be changed to modify the executable used for flake8. Set
|
|
|
|
this to `'pipenv'` to invoke `'pipenv` `run` `flake8'`.
|
2017-03-28 18:25:44 -04:00
|
|
|
|
|
|
|
|
2017-04-15 08:35:54 -04:00
|
|
|
g:ale_python_flake8_options *g:ale_python_flake8_options*
|
2017-04-27 17:04:34 -04:00
|
|
|
*b:ale_python_flake8_options*
|
2017-03-28 18:25:44 -04:00
|
|
|
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
|
2017-04-15 08:35:54 -04:00
|
|
|
let g:ale_python_flake8_options = '-m flake8'
|
2017-03-28 18:25:44 -04:00
|
|
|
<
|
|
|
|
after making sure it's installed for the appropriate Python versions (e.g.
|
|
|
|
`python3 -m pip install --user flake8`).
|
|
|
|
|
|
|
|
|
2017-05-07 11:16:17 -04:00
|
|
|
g:ale_python_flake8_use_global *g:ale_python_flake8_use_global*
|
|
|
|
*b:ale_python_flake8_use_global*
|
|
|
|
Type: |Number|
|
2018-04-09 14:11:20 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2017-05-07 11:16:17 -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.
|
|
|
|
|
|
|
|
|
Add python_[linter]_auto_pipenv options for python linters (fixes #1656)
When set to true, and the buffer is currently inside a pipenv,
GetExecutable will return "pipenv", which will trigger the existing
functionality to append the correct pipenv arguments to run each linter.
Defaults to false.
I was going to implement ale#python#PipenvPresent by invoking
`pipenv --venv` or `pipenv --where`, but it seemed to be abominably
slow, even to the point where the test suite wasn't even finishing
("Tried to run tests 3 times"). The diff is:
diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim
index 7baae079..8c100d41 100644
--- a/autoload/ale/python.vim
+++ b/autoload/ale/python.vim
@@ -106,5 +106,9 @@ endfunction
" Detects whether a pipenv environment is present.
function! ale#python#PipenvPresent(buffer) abort
- return findfile('Pipfile.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
+ let l:cd_string = ale#path#BufferCdString(a:buffer)
+ let l:output = systemlist(l:cd_string . 'pipenv --where')[0]
+ " `pipenv --where` returns the path to the dir containing the Pipfile
+ " if in a pipenv, or some error text otherwise.
+ return strpart(l:output, 0, 18) !=# "No Pipfile present"
endfunction
Using vim's `findfile` is much faster, behaves correctly in the majority
of situations, and also works reliably when the `pipenv` command doesn't
exist.
2018-07-11 23:02:23 -04:00
|
|
|
g:ale_python_flake8_auto_pipenv *g:ale_python_flake8_auto_pipenv*
|
|
|
|
*b: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.
|
|
|
|
|
|
|
|
|
2017-07-08 09:17:26 -04:00
|
|
|
===============================================================================
|
2017-06-18 06:03:31 -04:00
|
|
|
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-05 04:24:57 -04:00
|
|
|
g:ale_python_isort_options *g:ale_python_isort_options*
|
|
|
|
*b:ale_python_isort_options*
|
2018-07-04 13:01:16 -04:00
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be set to pass extra options to isort.
|
|
|
|
|
|
|
|
|
2017-06-18 06:03:31 -04:00
|
|
|
g:ale_python_isort_use_global *g:ale_python_isort_use_global*
|
|
|
|
*b:ale_python_isort_use_global*
|
|
|
|
Type: |Number|
|
2018-04-09 14:11:20 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2017-06-18 06:03:31 -04:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
2017-07-08 09:17:26 -04:00
|
|
|
===============================================================================
|
2017-03-28 18:25:44 -04:00
|
|
|
mypy *ale-python-mypy*
|
|
|
|
|
2017-06-27 05:06:03 -04:00
|
|
|
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-05-30 15:09:33 -04:00
|
|
|
`mypy` will be run from a detected project root, per |ale-python-root|.
|
|
|
|
|
2017-06-27 05:06:03 -04:00
|
|
|
|
2017-05-06 18:19:54 -04:00
|
|
|
g:ale_python_mypy_executable *g:ale_python_mypy_executable*
|
|
|
|
*b:ale_python_mypy_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'mypy'`
|
|
|
|
|
2017-06-18 06:03:31 -04:00
|
|
|
See |ale-integrations-local-executables|
|
2017-05-06 18:19:54 -04:00
|
|
|
|
2018-06-04 22:43:02 -04:00
|
|
|
Set this to `'pipenv'` to invoke `'pipenv` `run` `mypy'`.
|
|
|
|
|
2018-01-11 11:43:10 -05: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.
|
|
|
|
|
2017-05-06 18:19:54 -04:00
|
|
|
|
2017-03-28 18:25:44 -04:00
|
|
|
g:ale_python_mypy_options *g:ale_python_mypy_options*
|
2017-04-27 17:04:34 -04:00
|
|
|
*b:ale_python_mypy_options*
|
2017-03-28 18:25:44 -04:00
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be changed to add command-line arguments to the mypy
|
|
|
|
invocation.
|
|
|
|
|
|
|
|
|
2017-05-06 18:19:54 -04:00
|
|
|
g:ale_python_mypy_use_global *g:ale_python_mypy_use_global*
|
|
|
|
*b:ale_python_mypy_use_global*
|
|
|
|
Type: |Number|
|
2018-04-09 14:11:20 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2017-05-06 18:19:54 -04:00
|
|
|
|
2017-06-18 06:03:31 -04:00
|
|
|
See |ale-integrations-local-executables|
|
2017-05-06 18:19:54 -04:00
|
|
|
|
|
|
|
|
Add python_[linter]_auto_pipenv options for python linters (fixes #1656)
When set to true, and the buffer is currently inside a pipenv,
GetExecutable will return "pipenv", which will trigger the existing
functionality to append the correct pipenv arguments to run each linter.
Defaults to false.
I was going to implement ale#python#PipenvPresent by invoking
`pipenv --venv` or `pipenv --where`, but it seemed to be abominably
slow, even to the point where the test suite wasn't even finishing
("Tried to run tests 3 times"). The diff is:
diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim
index 7baae079..8c100d41 100644
--- a/autoload/ale/python.vim
+++ b/autoload/ale/python.vim
@@ -106,5 +106,9 @@ endfunction
" Detects whether a pipenv environment is present.
function! ale#python#PipenvPresent(buffer) abort
- return findfile('Pipfile.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
+ let l:cd_string = ale#path#BufferCdString(a:buffer)
+ let l:output = systemlist(l:cd_string . 'pipenv --where')[0]
+ " `pipenv --where` returns the path to the dir containing the Pipfile
+ " if in a pipenv, or some error text otherwise.
+ return strpart(l:output, 0, 18) !=# "No Pipfile present"
endfunction
Using vim's `findfile` is much faster, behaves correctly in the majority
of situations, and also works reliably when the `pipenv` command doesn't
exist.
2018-07-11 23:02:23 -04:00
|
|
|
g:ale_python_mypy_auto_pipenv *g:ale_python_mypy_auto_pipenv*
|
|
|
|
*b: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.
|
|
|
|
|
|
|
|
|
2017-12-01 12:04:30 -05:00
|
|
|
===============================================================================
|
|
|
|
prospector *ale-python-prospector*
|
|
|
|
|
2018-01-11 11:43:10 -05:00
|
|
|
g:ale_python_prospector_executable *g:ale_python_prospector_executable*
|
|
|
|
*b:ale_python_prospector_executable*
|
2017-12-01 12:04:30 -05:00
|
|
|
Type: |String|
|
|
|
|
Default: `'prospector'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
2018-06-04 22:43:02 -04:00
|
|
|
Set this to `'pipenv'` to invoke `'pipenv` `run` `prospector'`.
|
|
|
|
|
2017-12-01 12:04:30 -05:00
|
|
|
|
2018-01-11 11:43:10 -05:00
|
|
|
g:ale_python_prospector_options *g:ale_python_prospector_options*
|
|
|
|
*b:ale_python_prospector_options*
|
2017-12-01 12:04:30 -05:00
|
|
|
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`).
|
|
|
|
|
|
|
|
|
2018-01-11 11:43:10 -05:00
|
|
|
g:ale_python_prospector_use_global *g:ale_python_prospector_use_global*
|
|
|
|
*b:ale_python_prospector_use_global*
|
2017-12-01 12:04:30 -05:00
|
|
|
Type: |Number|
|
2018-04-09 14:11:20 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2017-12-01 12:04:30 -05:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
Add python_[linter]_auto_pipenv options for python linters (fixes #1656)
When set to true, and the buffer is currently inside a pipenv,
GetExecutable will return "pipenv", which will trigger the existing
functionality to append the correct pipenv arguments to run each linter.
Defaults to false.
I was going to implement ale#python#PipenvPresent by invoking
`pipenv --venv` or `pipenv --where`, but it seemed to be abominably
slow, even to the point where the test suite wasn't even finishing
("Tried to run tests 3 times"). The diff is:
diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim
index 7baae079..8c100d41 100644
--- a/autoload/ale/python.vim
+++ b/autoload/ale/python.vim
@@ -106,5 +106,9 @@ endfunction
" Detects whether a pipenv environment is present.
function! ale#python#PipenvPresent(buffer) abort
- return findfile('Pipfile.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
+ let l:cd_string = ale#path#BufferCdString(a:buffer)
+ let l:output = systemlist(l:cd_string . 'pipenv --where')[0]
+ " `pipenv --where` returns the path to the dir containing the Pipfile
+ " if in a pipenv, or some error text otherwise.
+ return strpart(l:output, 0, 18) !=# "No Pipfile present"
endfunction
Using vim's `findfile` is much faster, behaves correctly in the majority
of situations, and also works reliably when the `pipenv` command doesn't
exist.
2018-07-11 23:02:23 -04:00
|
|
|
g:ale_python_prospector_auto_pipenv *g:ale_python_prospector_auto_pipenv*
|
|
|
|
*b: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.
|
|
|
|
|
|
|
|
|
2017-08-25 07:46:56 -04:00
|
|
|
===============================================================================
|
|
|
|
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-04 22:43:02 -04:00
|
|
|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pycodestyle'`.
|
|
|
|
|
2017-08-25 07:46:56 -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-04-09 14:11:20 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2017-08-25 07:46:56 -04:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
Add python_[linter]_auto_pipenv options for python linters (fixes #1656)
When set to true, and the buffer is currently inside a pipenv,
GetExecutable will return "pipenv", which will trigger the existing
functionality to append the correct pipenv arguments to run each linter.
Defaults to false.
I was going to implement ale#python#PipenvPresent by invoking
`pipenv --venv` or `pipenv --where`, but it seemed to be abominably
slow, even to the point where the test suite wasn't even finishing
("Tried to run tests 3 times"). The diff is:
diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim
index 7baae079..8c100d41 100644
--- a/autoload/ale/python.vim
+++ b/autoload/ale/python.vim
@@ -106,5 +106,9 @@ endfunction
" Detects whether a pipenv environment is present.
function! ale#python#PipenvPresent(buffer) abort
- return findfile('Pipfile.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
+ let l:cd_string = ale#path#BufferCdString(a:buffer)
+ let l:output = systemlist(l:cd_string . 'pipenv --where')[0]
+ " `pipenv --where` returns the path to the dir containing the Pipfile
+ " if in a pipenv, or some error text otherwise.
+ return strpart(l:output, 0, 18) !=# "No Pipfile present"
endfunction
Using vim's `findfile` is much faster, behaves correctly in the majority
of situations, and also works reliably when the `pipenv` command doesn't
exist.
2018-07-11 23:02:23 -04:00
|
|
|
g:ale_python_pycodestyle_auto_pipenv *g:ale_python_pycodestyle_auto_pipenv*
|
|
|
|
*b: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.
|
|
|
|
|
|
|
|
|
2018-12-06 13:27:03 -05:00
|
|
|
===============================================================================
|
|
|
|
pydocstyle *ale-python-pydocstyle*
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_pydocstyle_executable *g:ale_python_pydocstyle_executable*
|
|
|
|
*b:ale_python_pydocstyle_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'pydocstyle'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pydocstyle'`.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_pydocstyle_options *g:ale_python_pydocstyle_options*
|
|
|
|
*b:ale_python_pydocstyle_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be changed to add command-line arguments to the
|
|
|
|
pydocstyle invocation.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_pydocstyle_use_global *g:ale_python_pydocstyle_use_global*
|
|
|
|
*b:ale_python_pydocstyle_use_global*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_pydocstyle_auto_pipenv *g:ale_python_pydocstyle_auto_pipenv*
|
|
|
|
*b: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.
|
|
|
|
|
|
|
|
|
2018-06-04 22:43:02 -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'`.
|
|
|
|
|
|
|
|
|
Add python_[linter]_auto_pipenv options for python linters (fixes #1656)
When set to true, and the buffer is currently inside a pipenv,
GetExecutable will return "pipenv", which will trigger the existing
functionality to append the correct pipenv arguments to run each linter.
Defaults to false.
I was going to implement ale#python#PipenvPresent by invoking
`pipenv --venv` or `pipenv --where`, but it seemed to be abominably
slow, even to the point where the test suite wasn't even finishing
("Tried to run tests 3 times"). The diff is:
diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim
index 7baae079..8c100d41 100644
--- a/autoload/ale/python.vim
+++ b/autoload/ale/python.vim
@@ -106,5 +106,9 @@ endfunction
" Detects whether a pipenv environment is present.
function! ale#python#PipenvPresent(buffer) abort
- return findfile('Pipfile.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
+ let l:cd_string = ale#path#BufferCdString(a:buffer)
+ let l:output = systemlist(l:cd_string . 'pipenv --where')[0]
+ " `pipenv --where` returns the path to the dir containing the Pipfile
+ " if in a pipenv, or some error text otherwise.
+ return strpart(l:output, 0, 18) !=# "No Pipfile present"
endfunction
Using vim's `findfile` is much faster, behaves correctly in the majority
of situations, and also works reliably when the `pipenv` command doesn't
exist.
2018-07-11 23:02:23 -04:00
|
|
|
g:ale_python_pyflakes_auto_pipenv *g:ale_python_pyflakes_auto_pipenv*
|
|
|
|
*b:ale_python_pyflakes_auto_pipenv*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
|
2019-02-08 16:44:34 -05:00
|
|
|
if true. This is overridden by a manually-set executable.
|
|
|
|
|
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
pylama *ale-python-pylama*
|
|
|
|
|
|
|
|
g:ale_python_pylama_change_directory *g:ale_python_pylama_change_directory*
|
|
|
|
*b: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.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_pylama_executable *g:ale_python_pylama_executable*
|
|
|
|
*b: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'`.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_pylama_options *g:ale_python_pylama_options*
|
|
|
|
*b:ale_python_pylama_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be changed to add command-line arguments to the pylama
|
|
|
|
invocation.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_pylama_use_global *g:ale_python_pylama_use_global*
|
|
|
|
*b: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.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_python_pylama_auto_pipenv *g:ale_python_pylama_auto_pipenv*
|
|
|
|
*b:ale_python_pylama_auto_pipenv*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `0`
|
|
|
|
|
|
|
|
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
|
Add python_[linter]_auto_pipenv options for python linters (fixes #1656)
When set to true, and the buffer is currently inside a pipenv,
GetExecutable will return "pipenv", which will trigger the existing
functionality to append the correct pipenv arguments to run each linter.
Defaults to false.
I was going to implement ale#python#PipenvPresent by invoking
`pipenv --venv` or `pipenv --where`, but it seemed to be abominably
slow, even to the point where the test suite wasn't even finishing
("Tried to run tests 3 times"). The diff is:
diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim
index 7baae079..8c100d41 100644
--- a/autoload/ale/python.vim
+++ b/autoload/ale/python.vim
@@ -106,5 +106,9 @@ endfunction
" Detects whether a pipenv environment is present.
function! ale#python#PipenvPresent(buffer) abort
- return findfile('Pipfile.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
+ let l:cd_string = ale#path#BufferCdString(a:buffer)
+ let l:output = systemlist(l:cd_string . 'pipenv --where')[0]
+ " `pipenv --where` returns the path to the dir containing the Pipfile
+ " if in a pipenv, or some error text otherwise.
+ return strpart(l:output, 0, 18) !=# "No Pipfile present"
endfunction
Using vim's `findfile` is much faster, behaves correctly in the majority
of situations, and also works reliably when the `pipenv` command doesn't
exist.
2018-07-11 23:02:23 -04:00
|
|
|
if true. This is overridden by a manually-set executable.
|
|
|
|
|
|
|
|
|
2017-07-08 09:17:26 -04:00
|
|
|
===============================================================================
|
2017-03-28 18:25:44 -04:00
|
|
|
pylint *ale-python-pylint*
|
|
|
|
|
2018-04-17 08:30:30 -04:00
|
|
|
g:ale_python_pylint_change_directory *g:ale_python_pylint_change_directory*
|
|
|
|
*b:ale_python_pylint_change_directory*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
|
|
|
|
2019-02-17 12:12:24 -05:00
|
|
|
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.
|
2018-04-17 08:30:30 -04:00
|
|
|
|
|
|
|
|
2017-03-28 18:25:44 -04:00
|
|
|
g:ale_python_pylint_executable *g:ale_python_pylint_executable*
|
2017-04-27 17:04:34 -04:00
|
|
|
*b:ale_python_pylint_executable*
|
2017-03-28 18:25:44 -04:00
|
|
|
Type: |String|
|
|
|
|
Default: `'pylint'`
|
|
|
|
|
2017-06-18 06:03:31 -04:00
|
|
|
See |ale-integrations-local-executables|
|
2017-03-28 18:25:44 -04:00
|
|
|
|
2018-06-04 22:43:02 -04:00
|
|
|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pylint'`.
|
|
|
|
|
2017-03-28 18:25:44 -04:00
|
|
|
|
|
|
|
g:ale_python_pylint_options *g:ale_python_pylint_options*
|
2017-04-27 17:04:34 -04:00
|
|
|
*b:ale_python_pylint_options*
|
2017-03-28 18:25:44 -04:00
|
|
|
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
|
2017-10-24 09:11:56 -04:00
|
|
|
let g:ale_python_pylint_options = '--rcfile /path/to/pylint.rc'
|
2017-05-06 18:19:54 -04:00
|
|
|
" The virtualenv detection needs to be disabled.
|
|
|
|
let g:ale_python_pylint_use_global = 0
|
2017-03-28 18:25:44 -04:00
|
|
|
|
|
|
|
after making sure it's installed for the appropriate Python versions (e.g.
|
|
|
|
`python3 -m pip install --user pylint`).
|
|
|
|
|
|
|
|
|
2017-05-06 14:11:43 -04:00
|
|
|
g:ale_python_pylint_use_global *g:ale_python_pylint_use_global*
|
|
|
|
*b:ale_python_pylint_use_global*
|
|
|
|
Type: |Number|
|
2018-04-09 14:11:20 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2017-05-06 14:11:43 -04:00
|
|
|
|
2017-06-18 06:03:31 -04:00
|
|
|
See |ale-integrations-local-executables|
|
2017-05-06 14:11:43 -04:00
|
|
|
|
2017-11-21 18:51:18 -05:00
|
|
|
|
Add python_[linter]_auto_pipenv options for python linters (fixes #1656)
When set to true, and the buffer is currently inside a pipenv,
GetExecutable will return "pipenv", which will trigger the existing
functionality to append the correct pipenv arguments to run each linter.
Defaults to false.
I was going to implement ale#python#PipenvPresent by invoking
`pipenv --venv` or `pipenv --where`, but it seemed to be abominably
slow, even to the point where the test suite wasn't even finishing
("Tried to run tests 3 times"). The diff is:
diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim
index 7baae079..8c100d41 100644
--- a/autoload/ale/python.vim
+++ b/autoload/ale/python.vim
@@ -106,5 +106,9 @@ endfunction
" Detects whether a pipenv environment is present.
function! ale#python#PipenvPresent(buffer) abort
- return findfile('Pipfile.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
+ let l:cd_string = ale#path#BufferCdString(a:buffer)
+ let l:output = systemlist(l:cd_string . 'pipenv --where')[0]
+ " `pipenv --where` returns the path to the dir containing the Pipfile
+ " if in a pipenv, or some error text otherwise.
+ return strpart(l:output, 0, 18) !=# "No Pipfile present"
endfunction
Using vim's `findfile` is much faster, behaves correctly in the majority
of situations, and also works reliably when the `pipenv` command doesn't
exist.
2018-07-11 23:02:23 -04:00
|
|
|
g:ale_python_pylint_auto_pipenv *g:ale_python_pylint_auto_pipenv*
|
|
|
|
*b: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.
|
|
|
|
|
|
|
|
|
2019-05-09 12:28:18 -04:00
|
|
|
g:ale_python_pylint_use_msg_id *g:ale_python_pylint_use_msg_id*
|
|
|
|
*b: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).
|
|
|
|
|
2017-11-08 12:58:56 -05:00
|
|
|
===============================================================================
|
|
|
|
pyls *ale-python-pyls*
|
|
|
|
|
2018-05-30 15:09:33 -04:00
|
|
|
`pyls` will be run from a detected project root, per |ale-python-root|.
|
|
|
|
|
|
|
|
|
2017-11-08 12:58:56 -05:00
|
|
|
g:ale_python_pyls_executable *g:ale_python_pyls_executable*
|
|
|
|
*b:ale_python_pyls_executable*
|
|
|
|
Type: |String|
|
2017-11-21 18:51:18 -05:00
|
|
|
Default: `'pyls'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
2018-06-04 22:43:02 -04:00
|
|
|
Set this to `'pipenv'` to invoke `'pipenv` `run` `pyls'`.
|
|
|
|
|
2017-11-21 18:51:18 -05:00
|
|
|
|
|
|
|
g:ale_python_pyls_use_global *g:ale_python_pyls_use_global*
|
|
|
|
*b:ale_python_pyls_use_global*
|
|
|
|
Type: |Number|
|
2018-04-09 14:11:20 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2017-11-08 12:58:56 -05:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
2017-06-18 06:03:31 -04:00
|
|
|
|
2017-11-21 18:51:18 -05:00
|
|
|
|
Add python_[linter]_auto_pipenv options for python linters (fixes #1656)
When set to true, and the buffer is currently inside a pipenv,
GetExecutable will return "pipenv", which will trigger the existing
functionality to append the correct pipenv arguments to run each linter.
Defaults to false.
I was going to implement ale#python#PipenvPresent by invoking
`pipenv --venv` or `pipenv --where`, but it seemed to be abominably
slow, even to the point where the test suite wasn't even finishing
("Tried to run tests 3 times"). The diff is:
diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim
index 7baae079..8c100d41 100644
--- a/autoload/ale/python.vim
+++ b/autoload/ale/python.vim
@@ -106,5 +106,9 @@ endfunction
" Detects whether a pipenv environment is present.
function! ale#python#PipenvPresent(buffer) abort
- return findfile('Pipfile.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
+ let l:cd_string = ale#path#BufferCdString(a:buffer)
+ let l:output = systemlist(l:cd_string . 'pipenv --where')[0]
+ " `pipenv --where` returns the path to the dir containing the Pipfile
+ " if in a pipenv, or some error text otherwise.
+ return strpart(l:output, 0, 18) !=# "No Pipfile present"
endfunction
Using vim's `findfile` is much faster, behaves correctly in the majority
of situations, and also works reliably when the `pipenv` command doesn't
exist.
2018-07-11 23:02:23 -04:00
|
|
|
g:ale_python_pyls_auto_pipenv *g:ale_python_pyls_auto_pipenv*
|
|
|
|
*b:ale_python_pyls_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.
|
|
|
|
|
|
|
|
|
2019-01-20 23:52:44 -05:00
|
|
|
g:ale_python_pyls_config *g:ale_python_pyls_config*
|
|
|
|
*b:ale_python_pyls_config*
|
|
|
|
Type: |Dictionary|
|
|
|
|
Default: `{}`
|
|
|
|
|
|
|
|
Dictionary with configuration settings for pyls. For example, to disable
|
|
|
|
the pycodestyle linter: >
|
|
|
|
{
|
|
|
|
\ 'pyls': {
|
|
|
|
\ 'plugins': {
|
|
|
|
\ 'pycodestyle': {
|
|
|
|
\ 'enabled': v:false
|
|
|
|
\ }
|
|
|
|
\ }
|
|
|
|
\ },
|
|
|
|
\ }
|
|
|
|
<
|
|
|
|
|
2018-07-01 14:59:49 -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|
|
|
|
|
|
|
|
|
|
Add python_[linter]_auto_pipenv options for python linters (fixes #1656)
When set to true, and the buffer is currently inside a pipenv,
GetExecutable will return "pipenv", which will trigger the existing
functionality to append the correct pipenv arguments to run each linter.
Defaults to false.
I was going to implement ale#python#PipenvPresent by invoking
`pipenv --venv` or `pipenv --where`, but it seemed to be abominably
slow, even to the point where the test suite wasn't even finishing
("Tried to run tests 3 times"). The diff is:
diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim
index 7baae079..8c100d41 100644
--- a/autoload/ale/python.vim
+++ b/autoload/ale/python.vim
@@ -106,5 +106,9 @@ endfunction
" Detects whether a pipenv environment is present.
function! ale#python#PipenvPresent(buffer) abort
- return findfile('Pipfile.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
+ let l:cd_string = ale#path#BufferCdString(a:buffer)
+ let l:output = systemlist(l:cd_string . 'pipenv --where')[0]
+ " `pipenv --where` returns the path to the dir containing the Pipfile
+ " if in a pipenv, or some error text otherwise.
+ return strpart(l:output, 0, 18) !=# "No Pipfile present"
endfunction
Using vim's `findfile` is much faster, behaves correctly in the majority
of situations, and also works reliably when the `pipenv` command doesn't
exist.
2018-07-11 23:02:23 -04:00
|
|
|
g:ale_python_pyre_auto_pipenv *g:ale_python_pyre_auto_pipenv*
|
|
|
|
*b: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.
|
|
|
|
|
|
|
|
|
2018-07-26 03:41:27 -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|
|
|
|
|
|
|
|
|
|
2019-02-10 10:18:55 -05:00
|
|
|
g:ale_python_vulture_options *g:ale_python_vulture_options*
|
|
|
|
*b:ale_python_vulture_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be changed to add command-line arguments to the vulture
|
|
|
|
invocation.
|
|
|
|
|
|
|
|
|
2018-07-26 03:41:27 -04:00
|
|
|
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|
|
|
|
|
|
|
|
|
|
2017-07-08 09:17:26 -04:00
|
|
|
===============================================================================
|
2017-06-18 06:03:31 -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-04-09 14:11:20 -04:00
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
2017-06-18 06:03:31 -04:00
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
2017-05-06 14:11:43 -04:00
|
|
|
|
|
|
|
|
2017-07-08 09:17:26 -04:00
|
|
|
===============================================================================
|
2017-03-28 18:25:44 -04:00
|
|
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|