diff options
author | w0rp <w0rp@users.noreply.github.com> | 2018-06-03 18:52:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-03 18:52:15 +0100 |
commit | a8bbf49a315ac2238d4bc0d55a681dc3c8ccf787 (patch) | |
tree | 42d1221e88465e633cdfdab3569f34bd151257ed /ale_linters | |
parent | 0db12702f33ad139ec3290508b6602ff16d0d444 (diff) | |
parent | dd642b117c2a9fd9bba9a452d147526e9858ec0d (diff) | |
download | ale-a8bbf49a315ac2238d4bc0d55a681dc3c8ccf787.zip |
Merge pull request #1625 from elebow/flake8-pipenv-run
Allow flake8 executable to be set to `pipenv`.
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/python/flake8.vim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ale_linters/python/flake8.vim b/ale_linters/python/flake8.vim index 7398b1dc..fdc4ac94 100644 --- a/ale_linters/python/flake8.vim +++ b/ale_linters/python/flake8.vim @@ -52,6 +52,10 @@ function! ale_linters#python#flake8#GetCommand(buffer, version_output) abort let l:executable = ale_linters#python#flake8#GetExecutable(a:buffer) let l:version = ale#semver#GetVersion(l:executable, a:version_output) + let l:exec_args = l:executable =~? 'pipenv$' + \ ? ' run flake8' + \ : '' + " Only include the --stdin-display-name argument if we can parse the " flake8 version, and it is recent enough to support it. let l:display_name_args = ale#semver#GTE(l:version, [3, 0, 0]) @@ -61,7 +65,7 @@ function! ale_linters#python#flake8#GetCommand(buffer, version_output) abort let l:options = ale#Var(a:buffer, 'python_flake8_options') return l:cd_string - \ . ale#Escape(l:executable) + \ . ale#Escape(l:executable) . l:exec_args \ . (!empty(l:options) ? ' ' . l:options : '') \ . ' --format=default' \ . l:display_name_args . ' -' |