diff --git a/scripts/dev/run_pylint_on_tests.py b/scripts/dev/run_pylint_on_tests.py index ec7ac0651..2ffa2974f 100644 --- a/scripts/dev/run_pylint_on_tests.py +++ b/scripts/dev/run_pylint_on_tests.py @@ -52,6 +52,7 @@ def main(): 'redefined-outer-name', 'unused-argument', 'missing-docstring', + 'protected-access', # https://bitbucket.org/logilab/pylint/issue/511/ 'undefined-variable', ] diff --git a/tests/browser/test_webelem.py b/tests/browser/test_webelem.py index f2fb2a3dc..94fa566d7 100644 --- a/tests/browser/test_webelem.py +++ b/tests/browser/test_webelem.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . -# pylint: disable=protected-access - """Tests for the webelement utils.""" from unittest import mock diff --git a/tests/config/test_config.py b/tests/config/test_config.py index 49312c016..0e70149dd 100644 --- a/tests/config/test_config.py +++ b/tests/config/test_config.py @@ -16,8 +16,6 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . -# pylint: disable=protected-access - """Tests for qutebrowser.config.config.""" import os diff --git a/tests/config/test_configtypes.py b/tests/config/test_configtypes.py index c97b439c9..ecc348365 100644 --- a/tests/config/test_configtypes.py +++ b/tests/config/test_configtypes.py @@ -16,8 +16,6 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . -# pylint: disable=protected-access - """Tests for qutebrowser.config.configtypes.""" import re diff --git a/tests/keyinput/test_basekeyparser.py b/tests/keyinput/test_basekeyparser.py index cb3f693f5..d5eadbb5e 100644 --- a/tests/keyinput/test_basekeyparser.py +++ b/tests/keyinput/test_basekeyparser.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . -# pylint: disable=protected-access - """Tests for BaseKeyParser.""" import sys diff --git a/tests/keyinput/test_modeparsers.py b/tests/keyinput/test_modeparsers.py index 47789b5b4..769b8a514 100644 --- a/tests/keyinput/test_modeparsers.py +++ b/tests/keyinput/test_modeparsers.py @@ -39,8 +39,6 @@ class TestsNormalKeyParser: kp: The NormalKeyParser to be tested. """ - # pylint: disable=protected-access - @pytest.yield_fixture(autouse=True) def setup(self, monkeypatch, stubs, config_stub, fake_keyconfig): """Set up mocks and read the test config.""" diff --git a/tests/mainwindow/statusbar/test_textbase.py b/tests/mainwindow/statusbar/test_textbase.py index eadf9c46a..94c502299 100644 --- a/tests/mainwindow/statusbar/test_textbase.py +++ b/tests/mainwindow/statusbar/test_textbase.py @@ -50,4 +50,4 @@ def test_elided_text(qtbot, elidemode, check): label.setText(long_string) label.resize(100, 50) label.show() - assert check(label._elided_text) # pylint: disable=protected-access + assert check(label._elided_text) diff --git a/tests/misc/test_editor.py b/tests/misc/test_editor.py index 586bbc2c9..274e720d2 100644 --- a/tests/misc/test_editor.py +++ b/tests/misc/test_editor.py @@ -19,8 +19,6 @@ """Tests for qutebrowser.misc.editor.""" -# pylint: disable=protected-access - import os import os.path import logging @@ -46,7 +44,7 @@ class TestArg: stubs.fake_qprocess()) self.editor = editor.ExternalEditor(0) yield - self.editor._cleanup() # pylint: disable=protected-access + self.editor._cleanup() @pytest.fixture def stubbed_config(self, config_stub, monkeypatch): @@ -229,7 +227,7 @@ class TestErrorMessage: monkeypatch.setattr('qutebrowser.misc.editor.config', config_stub) self.editor = editor.ExternalEditor(0) yield - self.editor._cleanup() # pylint: disable=protected-access + self.editor._cleanup() def test_proc_error(self, caplog): """Test on_proc_error.""" diff --git a/tests/misc/test_guiprocess.py b/tests/misc/test_guiprocess.py index cd3d69af0..a3ec58c6f 100644 --- a/tests/misc/test_guiprocess.py +++ b/tests/misc/test_guiprocess.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . -# pylint: disable=protected-access - """Tests for qutebrowser.misc.guiprocess.""" import os diff --git a/tests/misc/test_lineparser.py b/tests/misc/test_lineparser.py index 62f562560..a54427ce3 100644 --- a/tests/misc/test_lineparser.py +++ b/tests/misc/test_lineparser.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . -# pylint: disable=protected-access - """Tests for qutebrowser.misc.lineparser.""" import io diff --git a/tests/misc/test_readline.py b/tests/misc/test_readline.py index da2d05821..0aa883cc5 100644 --- a/tests/misc/test_readline.py +++ b/tests/misc/test_readline.py @@ -19,8 +19,6 @@ """Tests for qutebrowser.misc.readline.""" -# pylint: disable=protected-access - import re import inspect diff --git a/tests/utils/test_log.py b/tests/utils/test_log.py index 0adeb0ee1..04e3c5bdc 100644 --- a/tests/utils/test_log.py +++ b/tests/utils/test_log.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . -# pylint: disable=protected-access - """Tests for qutebrowser.utils.log.""" import logging diff --git a/tests/utils/test_qtutils.py b/tests/utils/test_qtutils.py index 3f80c2c83..8466d2471 100644 --- a/tests/utils/test_qtutils.py +++ b/tests/utils/test_qtutils.py @@ -928,8 +928,6 @@ class TestEventLoop: loop: The EventLoop we're testing. """ - # pylint: disable=protected-access - def _assert_executing(self): """Slot which gets called from timers to be sure the loop runs.""" assert self.loop._executing diff --git a/tests/utils/test_standarddir.py b/tests/utils/test_standarddir.py index 4981c299a..fbe2c268a 100644 --- a/tests/utils/test_standarddir.py +++ b/tests/utils/test_standarddir.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . -# pylint: disable=protected-access - """Tests for qutebrowser.utils.standarddir.""" import os diff --git a/tests/utils/test_urlutils.py b/tests/utils/test_urlutils.py index cc2478133..cff406a6c 100644 --- a/tests/utils/test_urlutils.py +++ b/tests/utils/test_urlutils.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . -# pylint: disable=protected-access - """Tests for qutebrowser.utils.urlutils.""" import os.path diff --git a/tests/utils/test_version.py b/tests/utils/test_version.py index 3804c2784..80f8f2909 100644 --- a/tests/utils/test_version.py +++ b/tests/utils/test_version.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . -# pylint: disable=protected-access - """Tests for qutebrowser.utils.version.""" import io diff --git a/tests/utils/usertypes/test_neighborlist.py b/tests/utils/usertypes/test_neighborlist.py index ffce4723e..1ec5a0733 100644 --- a/tests/utils/usertypes/test_neighborlist.py +++ b/tests/utils/usertypes/test_neighborlist.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . -# pylint: disable=protected-access - """Tests for the NeighborList class.""" from qutebrowser.utils import usertypes diff --git a/tests/utils/usertypes/test_timer.py b/tests/utils/usertypes/test_timer.py index 04e163ed1..08dc86b8a 100644 --- a/tests/utils/usertypes/test_timer.py +++ b/tests/utils/usertypes/test_timer.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . -# pylint: disable=protected-access - """Tests for Timer.""" from qutebrowser.utils import usertypes