mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-24 13:01:28 +08:00
Support pylama for python (#2266)
* Add pylama for python * Consolidate python traceback handling
This commit is contained in:
@@ -46,19 +46,14 @@ endfunction
|
||||
|
||||
|
||||
function! ale_linters#python#vulture#Handle(buffer, lines) abort
|
||||
for l:line in a:lines[:10]
|
||||
if match(l:line, '^Traceback') >= 0
|
||||
return [{
|
||||
\ 'lnum': 1,
|
||||
\ 'text': 'An exception was thrown. See :ALEDetail',
|
||||
\ 'detail': join(a:lines, "\n"),
|
||||
\}]
|
||||
endif
|
||||
endfor
|
||||
let l:output = ale#python#HandleTraceback(a:lines, 10)
|
||||
|
||||
if !empty(l:output)
|
||||
return l:output
|
||||
endif
|
||||
|
||||
" Matches patterns line the following:
|
||||
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+): (.*)$'
|
||||
let l:output = []
|
||||
let l:dir = s:GetDir(a:buffer)
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
|
||||
Reference in New Issue
Block a user