summaryrefslogtreecommitdiff
path: root/ale_linters/python/mypy.vim
blob: 8ca3e6379ecac93a07089e6ad5c66d067ab60637 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
" Author: Keith Smiley <k@keith.so>
" Description: mypy support for optional python typechecking

let g:ale_python_mypy_args = get(g:, 'ale_python_mypy_args', '')

function! g:ale_linters#python#mypy#GetCommand(buffer) abort
    return g:ale#util#stdin_wrapper
          \ . ' .py mypy --show-column-numbers '
          \ . g:ale_python_mypy_args
endfunction

call g:ale#linter#Define('python', {
\   'name': 'mypy',
\   'executable': 'mypy',
\   'command_callback': 'ale_linters#python#mypy#GetCommand',
\   'callback': 'ale#handlers#HandleGCCFormat',
\})