Merge pull request #1724 from randrej/master

Pipenv virtualenv and project path detection
This commit is contained in:
w0rp 2018-07-15 19:22:48 +01:00 committed by GitHub
commit 8141ced0d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@ let s:sep = has('win32') ? '\' : '/'
let s:bin_dir = has('unix') ? 'bin' : 'Scripts' let s:bin_dir = has('unix') ? 'bin' : 'Scripts'
let g:ale_virtualenv_dir_names = get(g:, 'ale_virtualenv_dir_names', [ let g:ale_virtualenv_dir_names = get(g:, 'ale_virtualenv_dir_names', [
\ '.env', \ '.env',
\ '.venv',
\ 'env', \ 'env',
\ 've-py3', \ 've-py3',
\ 've', \ 've',
@ -23,6 +24,8 @@ function! ale#python#FindProjectRootIni(buffer) abort
\|| filereadable(l:path . '/mypy.ini') \|| filereadable(l:path . '/mypy.ini')
\|| filereadable(l:path . '/pycodestyle.cfg') \|| filereadable(l:path . '/pycodestyle.cfg')
\|| filereadable(l:path . '/flake8.cfg') \|| filereadable(l:path . '/flake8.cfg')
\|| filereadable(l:path . '/Pipfile')
\|| filereadable(l:path . '/Pipfile.lock')
return l:path return l:path
endif endif
endfor endfor