diff options
author | Daniel Leong <falcone88@gmail.com> | 2021-02-11 15:29:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-11 20:29:23 +0000 |
commit | 8cb9f5ef515f73eb3cf3188cc20ff57a51d9217b (patch) | |
tree | 01f7d9e298f664a87ed3e2b8ebbef52e4e72c07d /ale_linters/python | |
parent | 3b184f88d32ff6492e99633f3c83d96c7a0caede (diff) | |
download | ale-8cb9f5ef515f73eb3cf3188cc20ff57a51d9217b.zip |
mypy: Pass user options before any others (#3582)
This enables us to use a custom `python` exe as the "mypy" executable
and pass `-m mypy` in `mypy_options`
Diffstat (limited to 'ale_linters/python')
-rw-r--r-- | ale_linters/python/mypy.vim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ale_linters/python/mypy.vim b/ale_linters/python/mypy.vim index 94dfae7d..1e35d929 100644 --- a/ale_linters/python/mypy.vim +++ b/ale_linters/python/mypy.vim @@ -43,12 +43,14 @@ function! ale_linters#python#mypy#GetCommand(buffer) abort \ ? ' run mypy' \ : '' + let l:options = ale#Var(a:buffer, 'python_mypy_options') + " We have to always switch to an explicit directory for a command so " we can know with certainty the base path for the 'filename' keys below. return ale#path#CdString(l:dir) \ . ale#Escape(l:executable) . l:exec_args - \ . ' --show-column-numbers ' - \ . ale#Var(a:buffer, 'python_mypy_options') + \ . (len(l:options) ? (' ' . l:options) : '') + \ . ' --show-column-numbers' \ . ' --shadow-file %s %t %s' endfunction |