diff options
author | w0rp <devw0rp@gmail.com> | 2017-04-15 13:35:54 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-04-15 13:36:16 +0100 |
commit | 706dd050f2ec570eb12398d42a18f6c4f2bd56df (patch) | |
tree | 2c463aa0d5ef02feab3f2ef87215bd4417b47729 /ale_linters/python | |
parent | 2f009690c3cf442f828830cc1d2fece619f308ff (diff) | |
download | ale-706dd050f2ec570eb12398d42a18f6c4f2bd56df.zip |
Fix #257 in preparation for #427, standardise options with fallbacks, and make it so every value can be computed dynamically
Diffstat (limited to 'ale_linters/python')
-rw-r--r-- | ale_linters/python/flake8.vim | 6 | ||||
-rw-r--r-- | ale_linters/python/mypy.vim | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/ale_linters/python/flake8.vim b/ale_linters/python/flake8.vim index bd136b27..378d6b53 100644 --- a/ale_linters/python/flake8.vim +++ b/ale_linters/python/flake8.vim @@ -4,8 +4,10 @@ let g:ale_python_flake8_executable = \ get(g:, 'ale_python_flake8_executable', 'flake8') -let g:ale_python_flake8_args = -\ get(g:, 'ale_python_flake8_args', '') +" Support an old setting as a fallback. +let s:default_options = get(g:, 'ale_python_flake8_args', '') +let g:ale_python_flake8_options = +\ get(g:, 'ale_python_flake8_options', s:default_options) " A map from Python executable paths to semver strings parsed for those " executables, so we don't have to look up the version number constantly. diff --git a/ale_linters/python/mypy.vim b/ale_linters/python/mypy.vim index 187bb83c..c60c0607 100644 --- a/ale_linters/python/mypy.vim +++ b/ale_linters/python/mypy.vim @@ -53,7 +53,7 @@ function! g:ale_linters#python#mypy#Handle(buffer, lines) abort return l:output endfunction -call g:ale#linter#Define('python', { +call ale#linter#Define('python', { \ 'name': 'mypy', \ 'executable': 'mypy', \ 'command_callback': 'ale_linters#python#mypy#GetCommand', |