mirror of https://github.com/dense-analysis/ale
Python .tool versions (#3820)
* Also check for asdf-vm's .tool_versions file A minimal python project may only be specifying a python version using a version management tool like asdf-vm, without providing other common python project configuration files. asdf-vm creates a single .tool_versions file in the managed directory. By checking for .tool_versions in addition to other common python config files we ensure that python linters (whose behaviour typically depends on a particular python version) will run with the same version of python used by the project. This will also be the same python version used by vim itself when it is run from inside the project's directories. * add .tool_versions to ale-python-root documentation This reflects the corresponding change to autoload/ale/python.vim
This commit is contained in:
parent
d6dbb5398e
commit
1893abdb19
|
@ -34,6 +34,7 @@ function! ale#python#FindProjectRootIni(buffer) abort
|
|||
\|| filereadable(l:path . '/Pipfile.lock')
|
||||
\|| filereadable(l:path . '/poetry.lock')
|
||||
\|| filereadable(l:path . '/pyproject.toml')
|
||||
\|| filereadable(l:path . '/.tool_versions')
|
||||
return l:path
|
||||
endif
|
||||
endfor
|
||||
|
|
|
@ -38,6 +38,7 @@ ALE will look for configuration files with the following filenames. >
|
|||
Pipfile.lock
|
||||
poetry.lock
|
||||
pyproject.toml
|
||||
.tool_versions
|
||||
<
|
||||
|
||||
The first directory containing any of the files named above will be used.
|
||||
|
|
Loading…
Reference in New Issue