Skip to content

Commit 13666d8

Browse files
committed
fixed default values of pymode_lint_ignore and pymode_lint_select to be lists
1 parent c224a04 commit 13666d8

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

doc/pymode.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ Select some error or warnings. *'g:pymode_lint_select'
317317
By example you disable all warnings starting from 'W', but want to see warning
318318
'W0011' and warning 'W430'
319319
>
320-
let g:pymode_lint_select = "E501,W0011,W430"
320+
let g:pymode_lint_select = ["E501", "W0011", "W430"]
321321
322322
Sort errors by relevance *'g:pymode_lint_sort'*
323323
If not empty, errors will be sort by defined relevance

plugin/pymode.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ call pymode#default("g:pymode_lint_message", 1)
111111
call pymode#default("g:pymode_lint_checkers", ['pyflakes', 'pep8', 'mccabe'])
112112

113113
" Skip errors and warnings (e.g. E4,W)
114-
call pymode#default("g:pymode_lint_ignore", "")
114+
call pymode#default("g:pymode_lint_ignore", [])
115115

116116
" Select errors and warnings (e.g. E4,W)
117-
call pymode#default("g:pymode_lint_select", "")
117+
call pymode#default("g:pymode_lint_select", [])
118118

119119
" Auto open cwindow if any errors has been finded
120120
call pymode#default("g:pymode_lint_cwindow", 1)

pymode/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Options(object):
1818
aggressive = 1
1919
diff = False
2020
experimental = True
21-
ignore = vim.eval('g:pymode_lint_ignore').split(',')
21+
ignore = vim.eval('g:pymode_lint_ignore')
2222
in_place = True
2323
indent_size = int(vim.eval('&tabstop'))
2424
line_range = None

pymode/lint.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,10 @@ def code_check():
3636
# DEPRECATE: v:0.10.0: need to be set as lists.
3737
if isinstance(env.var('g:pymode_lint_ignore'), str):
3838
raise ValueError ('g:pymode_lint_ignore should have a list type')
39-
ignore = env.var('g:pymode_lint_ignore').split(',')
4039
else:
4140
ignore = env.var('g:pymode_lint_ignore')
4241
if isinstance(env.var('g:pymode_lint_select'), str):
43-
raise ValueError ('g:pymode_lint_ignore should have a list type')
44-
select = env.var('g:pymode_lint_select').split(',')
42+
raise ValueError ('g:pymode_lint_select should have a list type')
4543
else:
4644
select = env.var('g:pymode_lint_select')
4745
options = parse_options(

0 commit comments

Comments
 (0)