Remove old pylint disables

This commit is contained in:
Florian Bruhin 2017-12-15 14:38:30 +01:00
parent e76732693c
commit bb44f1d4cc
5 changed files with 1 additions and 17 deletions

View File

@ -38,10 +38,6 @@ disable=no-self-use,
wrong-import-position, wrong-import-position,
no-else-return, no-else-return,
logging-not-lazy, logging-not-lazy,
# https://github.com/PyCQA/pylint/issues/1698
unsupported-membership-test,
unsupported-assignment-operation,
unsubscriptable-object,
too-many-boolean-expressions, too-many-boolean-expressions,
too-many-locals, too-many-locals,
too-many-branches, too-many-branches,

View File

@ -390,10 +390,8 @@ class HintManager(QObject):
def _cleanup(self): def _cleanup(self):
"""Clean up after hinting.""" """Clean up after hinting."""
# pylint: disable=not-an-iterable
for label in self._context.all_labels: for label in self._context.all_labels:
label.cleanup() label.cleanup()
# pylint: enable=not-an-iterable
text = self._get_text() text = self._get_text()
message_bridge = objreg.get('message-bridge', scope='window', message_bridge = objreg.get('message-bridge', scope='window',
@ -809,7 +807,6 @@ class HintManager(QObject):
log.hints.debug("Filtering hints on {!r}".format(filterstr)) log.hints.debug("Filtering hints on {!r}".format(filterstr))
visible = [] visible = []
# pylint: disable=not-an-iterable
for label in self._context.all_labels: for label in self._context.all_labels:
try: try:
if self._filter_matches(filterstr, str(label.elem)): if self._filter_matches(filterstr, str(label.elem)):
@ -821,7 +818,6 @@ class HintManager(QObject):
label.hide() label.hide()
except webelem.Error: except webelem.Error:
pass pass
# pylint: enable=not-an-iterable
if not visible: if not visible:
# Whoops, filtered all hints # Whoops, filtered all hints

View File

@ -134,9 +134,7 @@ class Completer(QObject):
return [], '', [] return [], '', []
parser = runners.CommandParser() parser = runners.CommandParser()
result = parser.parse(text, fallback=True, keep=True) result = parser.parse(text, fallback=True, keep=True)
# pylint: disable=not-an-iterable
parts = [x for x in result.cmdline if x] parts = [x for x in result.cmdline if x]
# pylint: enable=not-an-iterable
pos = self._cmd.cursorPosition() - len(self._cmd.prefix()) pos = self._cmd.cursorPosition() - len(self._cmd.prefix())
pos = min(pos, len(text)) # Qt treats 2-byte UTF-16 chars as 2 chars pos = min(pos, len(text)) # Qt treats 2-byte UTF-16 chars as 2 chars
log.completion.debug('partitioning {} around position {}'.format(parts, log.completion.debug('partitioning {} around position {}'.format(parts,

View File

@ -195,7 +195,6 @@ def test_enter_folder_smoke(dir_layout, quteproc):
@pytest.mark.parametrize('folder', DirLayout.layout_folders()) @pytest.mark.parametrize('folder', DirLayout.layout_folders())
def test_enter_folder(dir_layout, quteproc, folder): def test_enter_folder(dir_layout, quteproc, folder):
# pylint: disable=not-an-iterable
quteproc.open_url(dir_layout.file_url()) quteproc.open_url(dir_layout.file_url())
quteproc.click_element_by_text(text=folder) quteproc.click_element_by_text(text=folder)
expected_url = urlutils.file_url(dir_layout.path(folder)) expected_url = urlutils.file_url(dir_layout.path(folder))
@ -208,4 +207,3 @@ def test_enter_folder(dir_layout, quteproc, folder):
assert foldernames == folders assert foldernames == folders
filenames = [item.text for item in page.files] filenames = [item.text for item in page.files]
assert filenames == files assert filenames == files
# pylint: enable=not-an-iterable

View File

@ -56,8 +56,7 @@ def test_state_config(fake_save_manager, data_tmpdir,
if insert: if insert:
state['general']['newval'] = '23' state['general']['newval'] = '23'
# WORKAROUND for https://github.com/PyCQA/pylint/issues/574 if 'foobar' in (old_data or ''):
if 'foobar' in (old_data or ''): # pylint: disable=superfluous-parens
assert state['general']['foobar'] == '42' assert state['general']['foobar'] == '42'
state._save() state._save()
@ -105,10 +104,7 @@ class TestYaml:
print(lines) print(lines)
# WORKAROUND for https://github.com/PyCQA/pylint/issues/574
# pylint: disable=superfluous-parens
if 'magenta' in (old_config or ''): if 'magenta' in (old_config or ''):
# pylint: enable=superfluous-parens
assert ' colors.hints.fg: magenta' in lines assert ' colors.hints.fg: magenta' in lines
if insert: if insert:
assert ' tabs.show: never' in lines assert ' tabs.show: never' in lines