mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-10 03:31:34 +08:00
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:
@@ -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 : '')
|
||||
|
||||
Reference in New Issue
Block a user