diff --git a/.pylintrc b/.pylintrc index 241bd2d77..a6bebec71 100644 --- a/.pylintrc +++ b/.pylintrc @@ -38,10 +38,6 @@ disable=no-self-use, wrong-import-position, no-else-return, logging-not-lazy, - # https://github.com/PyCQA/pylint/issues/1698 - unsupported-membership-test, - unsupported-assignment-operation, - unsubscriptable-object, too-many-boolean-expressions, too-many-locals, too-many-branches, diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 6d40f531a..2520dd712 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -390,10 +390,8 @@ class HintManager(QObject): def _cleanup(self): """Clean up after hinting.""" - # pylint: disable=not-an-iterable for label in self._context.all_labels: label.cleanup() - # pylint: enable=not-an-iterable text = self._get_text() message_bridge = objreg.get('message-bridge', scope='window', @@ -809,7 +807,6 @@ class HintManager(QObject): log.hints.debug("Filtering hints on {!r}".format(filterstr)) visible = [] - # pylint: disable=not-an-iterable for label in self._context.all_labels: try: if self._filter_matches(filterstr, str(label.elem)): @@ -821,7 +818,6 @@ class HintManager(QObject): label.hide() except webelem.Error: pass - # pylint: enable=not-an-iterable if not visible: # Whoops, filtered all hints diff --git a/qutebrowser/completion/completer.py b/qutebrowser/completion/completer.py index edb1aca97..6eb8b51c4 100644 --- a/qutebrowser/completion/completer.py +++ b/qutebrowser/completion/completer.py @@ -134,9 +134,7 @@ class Completer(QObject): return [], '', [] parser = runners.CommandParser() result = parser.parse(text, fallback=True, keep=True) - # pylint: disable=not-an-iterable parts = [x for x in result.cmdline if x] - # pylint: enable=not-an-iterable pos = self._cmd.cursorPosition() - len(self._cmd.prefix()) pos = min(pos, len(text)) # Qt treats 2-byte UTF-16 chars as 2 chars log.completion.debug('partitioning {} around position {}'.format(parts, diff --git a/tests/end2end/test_dirbrowser.py b/tests/end2end/test_dirbrowser.py index 16da8d0bc..ea92e2ca2 100644 --- a/tests/end2end/test_dirbrowser.py +++ b/tests/end2end/test_dirbrowser.py @@ -195,7 +195,6 @@ def test_enter_folder_smoke(dir_layout, quteproc): @pytest.mark.parametrize('folder', DirLayout.layout_folders()) def test_enter_folder(dir_layout, quteproc, folder): - # pylint: disable=not-an-iterable quteproc.open_url(dir_layout.file_url()) quteproc.click_element_by_text(text=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 filenames = [item.text for item in page.files] assert filenames == files - # pylint: enable=not-an-iterable diff --git a/tests/unit/config/test_configfiles.py b/tests/unit/config/test_configfiles.py index b4e9742bc..63dc5b8b6 100644 --- a/tests/unit/config/test_configfiles.py +++ b/tests/unit/config/test_configfiles.py @@ -56,8 +56,7 @@ def test_state_config(fake_save_manager, data_tmpdir, if insert: state['general']['newval'] = '23' - # WORKAROUND for https://github.com/PyCQA/pylint/issues/574 - if 'foobar' in (old_data or ''): # pylint: disable=superfluous-parens + if 'foobar' in (old_data or ''): assert state['general']['foobar'] == '42' state._save() @@ -105,10 +104,7 @@ class TestYaml: print(lines) - # WORKAROUND for https://github.com/PyCQA/pylint/issues/574 - # pylint: disable=superfluous-parens if 'magenta' in (old_config or ''): - # pylint: enable=superfluous-parens assert ' colors.hints.fg: magenta' in lines if insert: assert ' tabs.show: never' in lines