2016-12-30 19:06:49 -05:00
|
|
|
" Author: Keith Smiley <k@keith.so>
|
|
|
|
" Description: mypy support for optional python typechecking
|
|
|
|
|
2017-01-15 08:20:23 -05:00
|
|
|
let g:ale_python_mypy_args = get(g:, 'ale_python_mypy_options', '')
|
2016-12-30 19:06:49 -05:00
|
|
|
|
|
|
|
function! g:ale_linters#python#mypy#GetCommand(buffer) abort
|
|
|
|
return g:ale#util#stdin_wrapper
|
2017-01-15 08:20:23 -05:00
|
|
|
\ . ' .py mypy --show-column-numbers '
|
|
|
|
\ . g:ale_python_mypy_options
|
2016-12-30 19:06:49 -05:00
|
|
|
endfunction
|
|
|
|
|
|
|
|
call g:ale#linter#Define('python', {
|
|
|
|
\ 'name': 'mypy',
|
|
|
|
\ 'executable': 'mypy',
|
|
|
|
\ 'command_callback': 'ale_linters#python#mypy#GetCommand',
|
|
|
|
\ 'callback': 'ale#handlers#HandleGCCFormat',
|
|
|
|
\})
|