summaryrefslogtreecommitdiff
path: root/ale_linters/python/mypy.vim
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-04-29 17:33:18 +0100
committerw0rp <devw0rp@gmail.com>2017-04-29 17:33:18 +0100
commit0b4acd645395d4196f2e346d65aeddf063927f4e (patch)
tree2701b1faefec6e1cc2dbfd5775d3bf94c6a5e022 /ale_linters/python/mypy.vim
parentcbb01e32b950f4a5c14d56b41759945662b2db49 (diff)
downloadale-0b4acd645395d4196f2e346d65aeddf063927f4e.zip
Fix #518 Fix handling of spaces in filenames for various linters
Diffstat (limited to 'ale_linters/python/mypy.vim')
-rw-r--r--ale_linters/python/mypy.vim4
1 files changed, 1 insertions, 3 deletions
diff --git a/ale_linters/python/mypy.vim b/ale_linters/python/mypy.vim
index 8c432f86..fff306ae 100644
--- a/ale_linters/python/mypy.vim
+++ b/ale_linters/python/mypy.vim
@@ -15,8 +15,6 @@ function! ale_linters#python#mypy#GetCommand(buffer) abort
\ . ' %t'
endfunction
-let s:path_pattern = '[a-zA-Z]\?\\\?:\?[[:alnum:]/\.\-_]\+'
-
function! ale_linters#python#mypy#Handle(buffer, lines) abort
" Look for lines like the following:
"
@@ -25,7 +23,7 @@ function! ale_linters#python#mypy#Handle(buffer, lines) abort
" Lines like these should be ignored below:
"
" file.py:4: note: (Stub files are from https://github.com/python/typeshed)
- let l:pattern = '^' . s:path_pattern . ':\(\d\+\):\?\(\d\+\)\?: \([^:]\+\): \(.\+\)$'
+ let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):?(\d+)?: ([^:]+): (.+)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)