Fix lint
This commit is contained in:
parent
5ea8e766f5
commit
d74daf9294
@ -21,12 +21,11 @@
|
||||
|
||||
import math
|
||||
import functools
|
||||
import sys
|
||||
import re
|
||||
import html as html_utils
|
||||
|
||||
from PyQt5.QtCore import (pyqtSignal, pyqtSlot, Qt, QEvent, QPoint, QPointF,
|
||||
QUrl, QTimer, QObject, qVersion)
|
||||
QUrl, QTimer, QObject)
|
||||
from PyQt5.QtGui import QKeyEvent, QIcon
|
||||
from PyQt5.QtNetwork import QAuthenticator
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
|
@ -52,6 +52,7 @@ def main():
|
||||
# pytest fixtures
|
||||
'redefined-outer-name',
|
||||
'unused-argument',
|
||||
'too-many-arguments',
|
||||
# things which are okay in tests
|
||||
'missing-docstring',
|
||||
'protected-access',
|
||||
|
@ -52,6 +52,9 @@ from qutebrowser.misc import savemanager, sql, objects
|
||||
from qutebrowser.keyinput import modeman
|
||||
|
||||
|
||||
_qute_scheme_handler = None
|
||||
|
||||
|
||||
class WinRegistryHelper:
|
||||
|
||||
"""Helper class for win_registry."""
|
||||
@ -160,13 +163,14 @@ def testdata_scheme(qapp):
|
||||
global _qute_scheme_handler
|
||||
from qutebrowser.browser.webengine import webenginequtescheme
|
||||
from PyQt5.QtWebEngineWidgets import QWebEngineProfile
|
||||
_qute_scheme_handler = webenginequtescheme.QuteSchemeHandler(parent=qapp)
|
||||
_qute_scheme_handler = webenginequtescheme.QuteSchemeHandler(
|
||||
parent=qapp)
|
||||
_qute_scheme_handler.install(QWebEngineProfile.defaultProfile())
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
@qutescheme.add_handler('testdata')
|
||||
def handler(url):
|
||||
def handler(url): # pylint: disable=unused-variable
|
||||
file_abs = os.path.abspath(os.path.dirname(__file__))
|
||||
filename = os.path.join(file_abs, '..', 'end2end',
|
||||
url.path().lstrip('/'))
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
"""Tests for caret browsing mode."""
|
||||
|
||||
import os.path
|
||||
import textwrap
|
||||
|
||||
import pytest
|
||||
@ -55,7 +54,8 @@ class Selection:
|
||||
quickly, we try to read it multiple times.
|
||||
"""
|
||||
for _ in range(10):
|
||||
with self._qtbot.wait_signal(self._callback_checker.got_result) as blocker:
|
||||
with self._qtbot.wait_signal(
|
||||
self._callback_checker.got_result) as blocker:
|
||||
self._caret.selection(self._callback_checker.callback)
|
||||
|
||||
selection = blocker.args[0]
|
||||
|
Loading…
Reference in New Issue
Block a user