Skip to content

Commit

Permalink
Preferences: Handle empty strings in pycodestyle and pydocstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
dalthviz committed Apr 29, 2019
1 parent 719f560 commit 35e95f4
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions spyder/plugins/editor/lsp/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,11 @@ def generate_python_config(self):

pycodestyle = {
'enabled': self.get_option('pycodestyle'),
'exclude': [exclude.strip() for exclude in cs_exclude],
'filename': [filename.strip() for filename in cs_filename],
'select': [select.strip() for select in cs_select],
'ignore': [ignore.strip() for ignore in cs_ignore],
'exclude': [exclude.strip() for exclude in cs_exclude if exclude],
'filename': [filename.strip()
for filename in cs_filename if filename],
'select': [select.strip() for select in cs_select if select],
'ignore': [ignore.strip() for ignore in cs_ignore if ignore],
'hangClosing': False,
'maxLineLength': cs_max_line_length
}
Expand All @@ -278,10 +279,12 @@ def generate_python_config(self):
pydocstyle = {
'enabled': self.get_option('pydocstyle'),
'convention': convention,
'addIgnore': [ignore.strip() for ignore in ds_add_ignore],
'addSelect': [select.strip() for select in ds_add_select],
'ignore': [ignore.strip() for ignore in ds_ignore],
'select': [select.strip() for select in ds_select],
'addIgnore': [ignore.strip()
for ignore in ds_add_ignore if ignore],
'addSelect': [select.strip()
for select in ds_add_select if select],
'ignore': [ignore.strip() for ignore in ds_ignore if ignore],
'select': [select.strip() for select in ds_select if select],
'match': self.get_option('pydocstyle/match'),
'matchDir': self.get_option('pydocstyle/match_dir')
}
Expand Down

0 comments on commit 35e95f4

Please sign in to comment.