diff options
author | Jeff Willette <jrwillette88@gmail.com> | 2021-07-14 04:58:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-14 20:58:25 +0900 |
commit | d8f4e8b7081724c0b9ff2491dd68409b3da69b0f (patch) | |
tree | 97e3da634b83677420bc27a270c56cf459bffcb1 | |
parent | 82a7e9f5889c13021ff61f8dc80b57348318c449 (diff) | |
download | ale-d8f4e8b7081724c0b9ff2491dd68409b3da69b0f.zip |
added filename to stdin stream of isort (#3815)
modified tests to run with new format
Co-authored-by: Jeff Willette <jeff@Jeffs-MacBook-Pro.local>
-rw-r--r-- | autoload/ale/fixers/isort.vim | 1 | ||||
-rw-r--r-- | test/fixers/test_isort_fixer_callback.vader | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/autoload/ale/fixers/isort.vim b/autoload/ale/fixers/isort.vim index ba95bb10..a640d233 100644 --- a/autoload/ale/fixers/isort.vim +++ b/autoload/ale/fixers/isort.vim @@ -29,6 +29,7 @@ function! ale#fixers#isort#Fix(buffer) abort return { \ 'cwd': '%s:h', \ 'command': ale#Escape(l:executable) . l:exec_args + \ . ale#Pad('--filename %s') \ . (!empty(l:options) ? ' ' . l:options : '') . ' -', \} endfunction diff --git a/test/fixers/test_isort_fixer_callback.vader b/test/fixers/test_isort_fixer_callback.vader index 9e112c03..8bfe1238 100644 --- a/test/fixers/test_isort_fixer_callback.vader +++ b/test/fixers/test_isort_fixer_callback.vader @@ -18,7 +18,7 @@ Execute(The isort callback should return the correct default values): AssertEqual \ { \ 'cwd': '%s:h', - \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/isort')) . ' -', + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/isort')) . ' --filename %s' . ' -', \ }, \ ale#fixers#isort#Fix(bufnr('')) @@ -34,7 +34,7 @@ Execute(The isort callback should respect custom options): \ { \ 'cwd': '%s:h', \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/isort')) - \ . ' --multi-line=3 --trailing-comma -', + \ . ' --filename %s' . ' --multi-line=3 --trailing-comma -', \ }, \ ale#fixers#isort#Fix(bufnr('')) @@ -46,6 +46,6 @@ Execute(Pipenv is detected when python_isort_auto_pipenv is set): AssertEqual \ { \ 'cwd': '%s:h', - \ 'command': ale#Escape('pipenv') . ' run isort -' + \ 'command': ale#Escape('pipenv') . ' run isort' . ' --filename %s' . ' -' \ }, \ ale#fixers#isort#Fix(bufnr('')) |