Remove now unneeded pylint suppressions
This commit is contained in:
parent
2453134011
commit
2237ca2bcf
@ -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):
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user