mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-07 05:04:28 +08:00
Fixed parsing of pydocstyle errors
ale#Escape function seems to prepend and append ' to the file name, which are not present in the pydocstyle output. Having the parsing regexp match the file name was overkill anyway, since there is an obvious 1:1 correspondence between the buffer number and the (potential) errors reported by pydocstyle.
This commit is contained in:
@@ -33,8 +33,7 @@ function! ale_linters#python#pydocstyle#Handle(buffer, lines) abort
|
||||
" Matches patterns like the following:
|
||||
" mydir/myfile.py:33 in public function `myfunction`:
|
||||
" DXXX: Error description
|
||||
let l:fname = ale#Escape(fnamemodify(bufname(a:buffer), ':p:t'))
|
||||
let l:line1_pattern = '\v^' . l:fname . ':\s*(\d+)\s+.*$'
|
||||
let l:line1_pattern = '\v^.*:\s*(\d+)\s+.*$'
|
||||
let l:line2_pattern = '\v^.*([a-zA-Z]\d+):\s*(.*)$'
|
||||
let l:output = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user