Remove now unneeded pylint suppressions

This commit is contained in:
Florian Bruhin 2018-11-28 12:54:19 +01:00
parent 2453134011
commit 2237ca2bcf
8 changed files with 6 additions and 14 deletions

View File

@ -117,8 +117,7 @@ class DownloadItem(downloads.AbstractDownloadItem):
def _get_open_filename(self):
return self._filename
def _set_fileobj(self, fileobj, *,
autoclose=True): # pylint: disable=unused-argument
def _set_fileobj(self, fileobj, *, autoclose=True):
raise downloads.UnsupportedOperationError
def _set_tempfile(self, fileobj):

View File

@ -280,7 +280,6 @@ class BackendImports:
def _try_import_backends():
"""Check whether backends can be imported and return BackendImports."""
# pylint: disable=unused-variable
results = BackendImports()
try:

View File

@ -133,7 +133,7 @@ def init_faulthandler(fileobj=sys.__stderr__):
def check_pyqt_core():
"""Check if PyQt core is installed."""
try:
import PyQt5.QtCore # pylint: disable=unused-variable
import PyQt5.QtCore
except ImportError as e:
text = _missing_str('PyQt5')
text = text.replace('<b>', '')
@ -187,7 +187,6 @@ def check_qt_version():
def check_ssl_support():
"""Check if SSL support is available."""
# pylint: disable=unused-variable
try:
from PyQt5.QtNetwork import QSslSocket
except ImportError:

View File

@ -285,7 +285,7 @@ class PyQIODevice(io.BufferedIOBase):
if not ok:
raise QtOSError(self.dev, msg="seek failed!")
def truncate(self, size=None): # pylint: disable=unused-argument
def truncate(self, size=None):
raise io.UnsupportedOperation
@property

View File

@ -370,7 +370,7 @@ def main():
if args.upload is not None:
# Fail early when trying to upload without github3 installed
# or without API token
import github3 # pylint: disable=unused-variable
import github3
read_github_token()
if args.no_asciidoc:

View File

@ -206,7 +206,6 @@ def pytest_configure(config):
webengine_env = os.environ.get('QUTE_BDD_WEBENGINE', '')
config.webengine = bool(webengine_arg or webengine_env)
# Fail early if QtWebEngine is not available
# pylint: disable=unused-variable
if config.webengine:
import PyQt5.QtWebEngineWidgets
@ -283,7 +282,7 @@ def apply_fake_os(monkeypatch, request):
def check_yaml_c_exts():
"""Make sure PyYAML C extensions are available on Travis."""
if 'TRAVIS' in os.environ:
from yaml import CLoader # pylint: disable=unused-variable
from yaml import CLoader
@pytest.hookimpl(tryfirst=True, hookwrapper=True)

View File

@ -73,7 +73,7 @@ def test_patched_errwindow(capfd, mocker, monkeypatch):
monkeypatch.setattr(checkpyver.sys, 'exit', lambda status: None)
try:
import tkinter # pylint: disable=unused-variable
import tkinter
except ImportError:
tk_mock = mocker.patch('qutebrowser.misc.checkpyver.Tk',
spec=['withdraw'], new_callable=mocker.Mock)

View File

@ -463,9 +463,7 @@ class TestPreventExceptions:
def test_raising(self, caplog):
"""Test with a raising function."""
with caplog.at_level(logging.ERROR, 'misc'):
# pylint: disable=assignment-from-no-return
ret = self.func_raising()
# pylint: enable=assignment-from-no-return
assert ret == 42
expected = 'Error in test_utils.TestPreventExceptions.func_raising'
assert caplog.messages == [expected]
@ -488,9 +486,7 @@ class TestPreventExceptions:
def test_predicate_true(self, caplog):
"""Test with a True predicate."""
with caplog.at_level(logging.ERROR, 'misc'):
# pylint: disable=assignment-from-no-return
ret = self.func_predicate_true()
# enable: disable=assignment-from-no-return
assert ret == 42
assert len(caplog.records) == 1