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 authored and w0rp committed 2019-08-18 15:45:15 +01:00
1 parent ddb559b3be
commit c4bdf165ca
3 files changed
+12

No files matched your search

+4
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 : '')