Fix #257 in preparation for #427, standardise options with fallbacks, and make it so every value can be computed dynamically
This commit is contained in:
parent
2f009690c3
commit
706dd050f2
16 changed files with 69 additions and 36 deletions
|
@ -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.
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue