From 1162e640c5621c99fc8974fb7527bb002d828735 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 19 Mar 2018 19:42:56 +0100 Subject: [PATCH] Remove unused imports --- tests/helpers/fixtures.py | 11 ----------- tests/unit/javascript/conftest.py | 3 +-- .../javascript/position_caret/test_position_caret.py | 1 - tests/unit/javascript/stylesheet/test_stylesheet.py | 5 ----- 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/tests/helpers/fixtures.py b/tests/helpers/fixtures.py index d1380a322..0e147b211 100644 --- a/tests/helpers/fixtures.py +++ b/tests/helpers/fixtures.py @@ -50,17 +50,6 @@ from qutebrowser.misc import savemanager, sql from qutebrowser.keyinput import modeman -try: - from PyQt5.QtWebKitWidgets import QWebView -except ImportError: - QWebView = None - -try: - from PyQt5.QtWebEngineWidgets import QWebEngineView -except ImportError: - QWebEngineView = None - - class WinRegistryHelper: """Helper class for win_registry.""" diff --git a/tests/unit/javascript/conftest.py b/tests/unit/javascript/conftest.py index f4750815a..f55ca75b5 100644 --- a/tests/unit/javascript/conftest.py +++ b/tests/unit/javascript/conftest.py @@ -21,7 +21,6 @@ import os import os.path -import logging import pytest import jinja2 @@ -29,7 +28,7 @@ import jinja2 from PyQt5.QtCore import QUrl import helpers.utils -from qutebrowser.utils import utils, usertypes +from qutebrowser.utils import utils class JSTester: diff --git a/tests/unit/javascript/position_caret/test_position_caret.py b/tests/unit/javascript/position_caret/test_position_caret.py index 06c54bb15..34b92dc66 100644 --- a/tests/unit/javascript/position_caret/test_position_caret.py +++ b/tests/unit/javascript/position_caret/test_position_caret.py @@ -23,7 +23,6 @@ import pytest import helpers.utils -from PyQt5.QtCore import Qt QWebSettings = pytest.importorskip("PyQt5.QtWebKit").QWebSettings QWebPage = pytest.importorskip("PyQt5.QtWebKitWidgets").QWebPage diff --git a/tests/unit/javascript/stylesheet/test_stylesheet.py b/tests/unit/javascript/stylesheet/test_stylesheet.py index 8a7b91ac6..6d3a7ce7f 100644 --- a/tests/unit/javascript/stylesheet/test_stylesheet.py +++ b/tests/unit/javascript/stylesheet/test_stylesheet.py @@ -27,11 +27,6 @@ QWebEngineProfile = QtWebEngineWidgets.QWebEngineProfile from qutebrowser.utils import javascript -try: - from qutebrowser.browser.webengine import webenginesettings -except ImportError: - webenginesettings = None - DEFAULT_BODY_BG = "rgba(0, 0, 0, 0)" GREEN_BODY_BG = "rgb(0, 255, 0)"