2024-11-08 17:43:43 -07:00
|
|
|
" Vim compiler file
|
|
|
|
" Compiler: Mypy (Python static checker)
|
|
|
|
" Maintainer: @Konfekt
|
2024-11-20 00:53:12 -07:00
|
|
|
" Last Change: 2024 Nov 19
|
2024-11-08 17:43:43 -07:00
|
|
|
|
|
|
|
if exists("current_compiler") | finish | endif
|
|
|
|
let current_compiler = "mypy"
|
|
|
|
|
|
|
|
let s:cpo_save = &cpo
|
|
|
|
set cpo&vim
|
|
|
|
|
|
|
|
" CompilerSet makeprg=mypy
|
|
|
|
let &l:makeprg = 'mypy --show-column-numbers '
|
|
|
|
\ ..get(b:, 'mypy_makeprg_params', get(g:, 'mypy_makeprg_params', '--strict --ignore-missing-imports'))
|
2024-11-20 00:53:12 -07:00
|
|
|
exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"')
|
2024-11-08 17:43:43 -07:00
|
|
|
CompilerSet errorformat=%f:%l:%c:\ %t%*[^:]:\ %m
|
|
|
|
|
|
|
|
let &cpo = s:cpo_save
|
|
|
|
unlet s:cpo_save
|