mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Add python mypy support
This adds support for the official optional python typechecker.
This commit is contained in:
17
ale_linters/python/mypy.vim
Normal file
17
ale_linters/python/mypy.vim
Normal file
@@ -0,0 +1,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',
|
||||
\})
|
||||
Reference in New Issue
Block a user