Black fixer should include --pyi for files with .pyi extension (#2705)

* black fixer should include --pyi for files with .pyi extension
This commit is contained in:
richyfish
2019-08-18 15:45:15 +01:00
committed by w0rp
parent ddb559b3be
commit c4bdf165ca
3 changed files with 12 additions and 0 deletions

View File

@@ -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 : '')