mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-08 05:24:46 +08:00
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user