From 033cb7f92cfa83abe2c8a3dcd9ea774b1511c6b0 Mon Sep 17 00:00:00 2001 From: Sergey Date: Tue, 19 Apr 2016 19:37:47 +0400 Subject: [PATCH 1/2] Restore possibility to add '--ignore' flag Because not all using config for flake8, but it can be possible just add: ``` autocmd BufWritePost *.py call Flake8() let g:flake8_ignore='E501' ``` --- autoload/flake8.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autoload/flake8.vim b/autoload/flake8.vim index 06a1b6b..c2b04e2 100644 --- a/autoload/flake8.vim +++ b/autoload/flake8.vim @@ -32,7 +32,7 @@ function s:Warnings() let l:show_website_url = 0 let l:msg = "has been deprecated in favour of flake8 config files" - for setting_name in ['g:flake8_ignore', 'g:flake8_builtins', 'g:flake8_max_line_length', 'g:flake8_max_complexity'] + for setting_name in ['g:flake8_builtins', 'g:flake8_max_line_length', 'g:flake8_max_complexity'] if exists(setting_name) echohl WarningMsg | echom setting_name l:msg | echohl None let l:show_website_url = 1 @@ -71,6 +71,8 @@ function! s:Setup() " {{{ " flake8 command call s:DeclareOption('flake8_cmd', '', '"flake8"') + " ignore + call s:DeclareOption('flake8_ignore', ' --ignore=', '') " quickfix call s:DeclareOption('flake8_quickfix_location', '', '"belowright"') call s:DeclareOption('flake8_quickfix_height', '', 5) @@ -137,7 +139,7 @@ function! s:Flake8() " {{{ " perform the grep itself let &grepformat="%f:%l:%c: %m\,%f:%l: %m" - let &grepprg=s:flake8_cmd + let &grepprg=s:flake8_cmd.s:flake8_ignore silent! grep! "%" " restore grep settings From 069d2ca0d081b21ec86859db318fdccab97f6b99 Mon Sep 17 00:00:00 2001 From: Sergey Date: Tue, 19 Apr 2016 19:55:41 +0400 Subject: [PATCH 2/2] remove 'ignore' from deprecated list --- README.mdown | 1 - 1 file changed, 1 deletion(-) diff --git a/README.mdown b/README.mdown index 692baad..4eb1ba1 100644 --- a/README.mdown +++ b/README.mdown @@ -115,7 +115,6 @@ advise users to use the `~/.config/flake8` config file. - Decprecated options: - `g:flake8_builtins` - - `g:flake8_ignore` - `g:flake8_max_line_length` - `g:flake8_max_complexity`