Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds .tool_versions to the list of config files used when determining the project root directory for python projects. Both the actual files checked and the corresponding documentation have been updated.
Rationale:
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 in particular creates a single .tool_versions file in the managed directory.
Currently, if .tool_versions is the only project config file, and any of the currently supported config files exist in a parent directory (eg: a global .pylintrc in the user's home directory), then ale will run the selected linters from that parent directory instead of the project directory. This can result in using a completely different version of python than that being used by vim itself.
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.