summaryrefslogtreecommitdiff
path: root/ale_linters/python/mypy.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/python/mypy.vim')
-rw-r--r--ale_linters/python/mypy.vim17
1 files changed, 2 insertions, 15 deletions
diff --git a/ale_linters/python/mypy.vim b/ale_linters/python/mypy.vim
index 3c8b181f..e39ee349 100644
--- a/ale_linters/python/mypy.vim
+++ b/ale_linters/python/mypy.vim
@@ -7,19 +7,7 @@ let g:ale_python_mypy_options = get(g:, 'ale_python_mypy_options', '')
let g:ale_python_mypy_use_global = get(g:, 'ale_python_mypy_use_global', 0)
function! ale_linters#python#mypy#GetExecutable(buffer) abort
- if !ale#Var(a:buffer, 'python_mypy_use_global')
- let l:virtualenv = ale#python#FindVirtualenv(a:buffer)
-
- if !empty(l:virtualenv)
- let l:ve_mypy = l:virtualenv . '/bin/mypy'
-
- if executable(l:ve_mypy)
- return l:ve_mypy
- endif
- endif
- endif
-
- return ale#Var(a:buffer, 'python_mypy_executable')
+ return ale#python#FindExecutable(a:buffer, 'python_mypy', ['/bin/mypy'])
endfunction
function! ale_linters#python#mypy#GetCommand(buffer) abort
@@ -33,7 +21,7 @@ function! ale_linters#python#mypy#GetCommand(buffer) abort
\ . ale#Escape(l:executable)
\ . ' --show-column-numbers '
\ . ale#Var(a:buffer, 'python_mypy_options')
- \ . ' %s'
+ \ . ' --shadow-file %s %t %s'
endfunction
function! ale_linters#python#mypy#Handle(buffer, lines) abort
@@ -69,5 +57,4 @@ call ale#linter#Define('python', {
\ 'executable_callback': 'ale_linters#python#mypy#GetExecutable',
\ 'command_callback': 'ale_linters#python#mypy#GetCommand',
\ 'callback': 'ale_linters#python#mypy#Handle',
-\ 'lint_file': 1,
\})