diff options
author | w0rp <devw0rp@gmail.com> | 2023-09-09 22:57:01 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2023-09-09 22:57:01 +0100 |
commit | 7b56ddc3f603ae05ae78c7a7032a8c77d6a7c8bd (patch) | |
tree | f2a397985a920074a7728c819c919028dc97a658 | |
parent | 65f0fd0d6a27a76e9d2d1b8f0f720b6bbc950039 (diff) | |
download | ale-7b56ddc3f603ae05ae78c7a7032a8c77d6a7c8bd.zip |
Close #4481 Try .venv first, drop ve-py3
.venv was going to be the officially recommended default virtualenv
directory name in PEP 704, which was not accepted. Still, poetry uses
this name by default, as do other projects. We can deem it the first
name we should try to search for.
ve-py3 was a directory name I can't find mentions of online, and was
used in my own projects during the days of migrating from Python 2 to 3.
We can just drop it, and people can update their settings if they still
need it.
-rw-r--r-- | autoload/ale/python.vim | 9 | ||||
-rw-r--r-- | doc/ale.txt | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim index 615986f9..2c7e0049 100644 --- a/autoload/ale/python.vim +++ b/autoload/ale/python.vim @@ -7,14 +7,17 @@ call ale#Set('python_auto_poetry', '0') let s:sep = has('win32') ? '\' : '/' " bin is used for Unix virtualenv directories, and Scripts is for Windows. let s:bin_dir = has('unix') ? 'bin' : 'Scripts' +" The default virtualenv directory names are ordered from the likely most +" common names down to the least common. `.env` might be more common, but it's +" also likely to conflict with a `.env` file for environment variables, so we +" search for it last. (People really shouldn't use that name.) let g:ale_virtualenv_dir_names = get(g:, 'ale_virtualenv_dir_names', [ -\ '.env', \ '.venv', \ 'env', -\ 've-py3', \ 've', -\ 'virtualenv', \ 'venv', +\ 'virtualenv', +\ '.env', \]) function! ale#python#FindProjectRootIni(buffer) abort diff --git a/doc/ale.txt b/doc/ale.txt index d36d9d0b..dff7ffa0 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -2449,7 +2449,7 @@ g:ale_virtualtext_single *g:ale_virtualtext_single* g:ale_virtualenv_dir_names *g:ale_virtualenv_dir_names* *b:ale_virtualenv_dir_names* Type: |List| - Default: `['.env', '.venv', 'env', 've-py3', 've', 'virtualenv', 'venv']` + Default: `['.venv', 'env', 've', 'venv', 'virtualenv', '.env']` A list of directory names to be used when searching upwards from Python files to discover virtualenv directories with. |