diff options
author | richyfish <richard.french.uk@googlemail.com> | 2019-08-18 15:45:15 +0100 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2019-08-18 15:45:15 +0100 |
commit | c4bdf165caf99706f439ecbe1a1d1865d53545a8 (patch) | |
tree | 546bd72eb8d8b4799294583773aa60f5c44bdb81 /autoload | |
parent | ddb559b3bed31b81e8189c3caa8074842574f662 (diff) | |
download | ale-c4bdf165caf99706f439ecbe1a1d1865d53545a8.zip |
Black fixer should include --pyi for files with .pyi extension (#2705)
* black fixer should include --pyi for files with .pyi extension
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/fixers/black.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/autoload/ale/fixers/black.vim b/autoload/ale/fixers/black.vim index 367b8d52..fba6c3b4 100644 --- a/autoload/ale/fixers/black.vim +++ b/autoload/ale/fixers/black.vim @@ -29,6 +29,10 @@ function! ale#fixers#black#Fix(buffer) abort let l:options = ale#Var(a:buffer, 'python_black_options') + if expand('#' . a:buffer . ':e') is? 'pyi' + let l:options .= '--pyi' + endif + return { \ 'command': l:cd_string . ale#Escape(l:executable) . l:exec_args \ . (!empty(l:options) ? ' ' . l:options : '') |