diff options
Diffstat (limited to 'autoload/ale/handlers/python.vim')
-rw-r--r-- | autoload/ale/handlers/python.vim | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/autoload/ale/handlers/python.vim b/autoload/ale/handlers/python.vim index 419e262e..ae6f6d6c 100644 --- a/autoload/ale/handlers/python.vim +++ b/autoload/ale/handlers/python.vim @@ -45,51 +45,3 @@ function! ale#handlers#python#HandlePEP8Format(buffer, lines) abort return l:output endfunction - -" Add blank lines before control statements. -function! ale#handlers#python#AddLinesBeforeControlStatements(buffer, lines) abort - let l:new_lines = [] - let l:last_indent_size = 0 - - for l:line in a:lines - let l:indent_size = len(matchstr(l:line, '^ *')) - - if l:indent_size <= l:last_indent_size - \&& match(l:line, '\v^ *(return|if|for|while|break|continue)') >= 0 - call add(l:new_lines, '') - endif - - call add(l:new_lines, l:line) - let l:last_indent_size = l:indent_size - endfor - - return l:new_lines -endfunction - -function! ale#handlers#python#AutoPEP8(buffer, lines) abort - return { - \ 'command': 'autopep8 -' - \} -endfunction - -function! ale#handlers#python#ISort(buffer, lines) abort - let l:config = ale#path#FindNearestFile(a:buffer, '.isort.cfg') - let l:config_options = !empty(l:config) - \ ? ' --settings-path ' . ale#Escape(l:config) - \ : '' - - return { - \ 'command': 'isort' . l:config_options . ' -', - \} -endfunction - -function! ale#handlers#python#YAPF(buffer, lines) abort - let l:config = ale#path#FindNearestFile(a:buffer, '.style.yapf') - let l:config_options = !empty(l:config) - \ ? ' --style ' . ale#Escape(l:config) - \ : '' - - return { - \ 'command': 'yapf --no-local-style' . l:config_options, - \} -endfunction |