diff options
author | foobarbyte <61650320+foobarbyte@users.noreply.github.com> | 2021-07-17 12:46:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-17 21:46:43 +0900 |
commit | 1893abdb1903fb45e7b28d3cd8ae7dd4197e0c3b (patch) | |
tree | 61e38f9ee2b80431168d443df5963e5e32c16ead | |
parent | d6dbb5398e805466ab30b4e7f1c78d7c4168fcf8 (diff) | |
download | ale-1893abdb1903fb45e7b28d3cd8ae7dd4197e0c3b.zip |
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
-rw-r--r-- | autoload/ale/python.vim | 1 | ||||
-rw-r--r-- | doc/ale-python.txt | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim index fc6c1130..779844a2 100644 --- a/autoload/ale/python.vim +++ b/autoload/ale/python.vim @@ -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 diff --git a/doc/ale-python.txt b/doc/ale-python.txt index 6deff8f2..21dee657 100644 --- a/doc/ale-python.txt +++ b/doc/ale-python.txt @@ -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. |