diff options
author | Florian Bruhin <me@the-compiler.org> | 2022-05-17 11:44:15 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2022-06-22 17:41:12 +0200 |
commit | b11acaa394ccfb13f30d9d0213ac82a15955788e (patch) | |
tree | 4ef8a879f78d9119505a8a1925952a841a996c66 | |
parent | cb8f207ba15cf826043a031b045b2ed4fdcfd7f3 (diff) | |
download | qutebrowser-b11acaa394ccfb13f30d9d0213ac82a15955788e.tar.gz qutebrowser-b11acaa394ccfb13f30d9d0213ac82a15955788e.zip |
WIP: Avoid linter issues with temporary Qt wrappers
26 files changed, 111 insertions, 0 deletions
diff --git a/qutebrowser/browser/webkit/webkitelem.py b/qutebrowser/browser/webkit/webkitelem.py index 62236dd7b..af0489635 100644 --- a/qutebrowser/browser/webkit/webkitelem.py +++ b/qutebrowser/browser/webkit/webkitelem.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. +# FIXME:qt6 +# pylint: disable=no-name-in-module + """QtWebKit specific part of the web element API.""" from typing import cast, TYPE_CHECKING, Iterator, List, Optional, Set diff --git a/qutebrowser/browser/webkit/webkithistory.py b/qutebrowser/browser/webkit/webkithistory.py index 83178a45a..aa1bd5aed 100644 --- a/qutebrowser/browser/webkit/webkithistory.py +++ b/qutebrowser/browser/webkit/webkithistory.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. +# FIXME:qt6 +# pylint: disable=no-name-in-module + """QtWebKit specific part of history.""" import functools diff --git a/qutebrowser/browser/webkit/webkitinspector.py b/qutebrowser/browser/webkit/webkitinspector.py index ceec6187c..a3b13eee9 100644 --- a/qutebrowser/browser/webkit/webkitinspector.py +++ b/qutebrowser/browser/webkit/webkitinspector.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. +# FIXME:qt6 +# pylint: disable=no-name-in-module + """Customized QWebInspector for QtWebKit.""" from qutebrowser.qt.webkit import QWebSettings diff --git a/qutebrowser/browser/webkit/webkitsettings.py b/qutebrowser/browser/webkit/webkitsettings.py index 2a5c3f765..86895a412 100644 --- a/qutebrowser/browser/webkit/webkitsettings.py +++ b/qutebrowser/browser/webkit/webkitsettings.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. +# FIXME:qt6 +# pylint: disable=no-name-in-module + """Bridge from QWebSettings to our own settings. Module attributes: diff --git a/qutebrowser/browser/webkit/webkittab.py b/qutebrowser/browser/webkit/webkittab.py index 03e421ceb..31c132f2c 100644 --- a/qutebrowser/browser/webkit/webkittab.py +++ b/qutebrowser/browser/webkit/webkittab.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. +# FIXME:qt6 +# pylint: disable=no-name-in-module + """Wrapper over our (QtWebKit) WebView.""" import re diff --git a/qutebrowser/browser/webkit/webpage.py b/qutebrowser/browser/webkit/webpage.py index ce83ddcc6..297c6ac88 100644 --- a/qutebrowser/browser/webkit/webpage.py +++ b/qutebrowser/browser/webkit/webpage.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. +# FIXME:qt6 +# pylint: disable=no-name-in-module + """The main browser widgets.""" import html diff --git a/qutebrowser/browser/webkit/webview.py b/qutebrowser/browser/webkit/webview.py index 32028400e..f5d253029 100644 --- a/qutebrowser/browser/webkit/webview.py +++ b/qutebrowser/browser/webkit/webview.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. +# FIXME:qt6 +# pylint: disable=no-name-in-module + """The main browser widgets.""" from qutebrowser.qt.core import pyqtSignal, Qt, QUrl diff --git a/qutebrowser/qt/core.py b/qutebrowser/qt/core.py index 356a11691..0c65720ad 100644 --- a/qutebrowser/qt/core.py +++ b/qutebrowser/qt/core.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring,import-error,wildcard-import,unused-wildcard-import +# flake8: noqa + from qutebrowser.qt import machinery diff --git a/qutebrowser/qt/dbus.py b/qutebrowser/qt/dbus.py index 5bf21a35b..e42e40317 100644 --- a/qutebrowser/qt/dbus.py +++ b/qutebrowser/qt/dbus.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring,import-error,wildcard-import,unused-wildcard-import +# flake8: noqa + from qutebrowser.qt import machinery diff --git a/qutebrowser/qt/gui.py b/qutebrowser/qt/gui.py index 9ce275217..f5312ecae 100644 --- a/qutebrowser/qt/gui.py +++ b/qutebrowser/qt/gui.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring,import-error,wildcard-import,unused-wildcard-import,unused-import +# flake8: noqa + from qutebrowser.qt import machinery diff --git a/qutebrowser/qt/machinery.py b/qutebrowser/qt/machinery.py index 4eb7761e1..81bcaf30a 100644 --- a/qutebrowser/qt/machinery.py +++ b/qutebrowser/qt/machinery.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring +# flake8: noqa + import os import importlib @@ -17,6 +22,8 @@ class Error(Exception): class Unavailable(Error, ImportError): + """Raised when a module is unavailable with the given wrapper.""" + def __init__(self) -> None: super().__init__(f"Unavailable with {WRAPPER}") diff --git a/qutebrowser/qt/network.py b/qutebrowser/qt/network.py index 44b1778e3..d7d74c12b 100644 --- a/qutebrowser/qt/network.py +++ b/qutebrowser/qt/network.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring,import-error,wildcard-import,unused-wildcard-import +# flake8: noqa + from qutebrowser.qt import machinery diff --git a/qutebrowser/qt/opengl.py b/qutebrowser/qt/opengl.py index e08a47601..1c1086b6f 100644 --- a/qutebrowser/qt/opengl.py +++ b/qutebrowser/qt/opengl.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring,import-error,wildcard-import,unused-import +# flake8: noqa + from qutebrowser.qt import machinery diff --git a/qutebrowser/qt/printsupport.py b/qutebrowser/qt/printsupport.py index 04a0d7334..9958e0503 100644 --- a/qutebrowser/qt/printsupport.py +++ b/qutebrowser/qt/printsupport.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring,import-error,wildcard-import,unused-wildcard-import +# flake8: noqa + from qutebrowser.qt import machinery diff --git a/qutebrowser/qt/qml.py b/qutebrowser/qt/qml.py index 85bcd0157..61e189208 100644 --- a/qutebrowser/qt/qml.py +++ b/qutebrowser/qt/qml.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring,import-error,wildcard-import,unused-wildcard-import +# flake8: noqa + from qutebrowser.qt import machinery diff --git a/qutebrowser/qt/sip.py b/qutebrowser/qt/sip.py index 9930a879e..213c4dffb 100644 --- a/qutebrowser/qt/sip.py +++ b/qutebrowser/qt/sip.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring,wildcard-import,unused-wildcard-import +# flake8: noqa + from qutebrowser.qt import machinery # While upstream recommends using PyQt6.sip ever since PyQt6 5.11, some distributions diff --git a/qutebrowser/qt/sql.py b/qutebrowser/qt/sql.py index e50753e2c..1e65b66c3 100644 --- a/qutebrowser/qt/sql.py +++ b/qutebrowser/qt/sql.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring,import-error,wildcard-import,unused-wildcard-import +# flake8: noqa + from qutebrowser.qt import machinery diff --git a/qutebrowser/qt/test.py b/qutebrowser/qt/test.py index 5d3d02cb0..6e262bf99 100644 --- a/qutebrowser/qt/test.py +++ b/qutebrowser/qt/test.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring,import-error,wildcard-import,unused-wildcard-import +# flake8: noqa + from qutebrowser.qt import machinery diff --git a/qutebrowser/qt/webenginecore.py b/qutebrowser/qt/webenginecore.py index fbc3d593c..f0cd1dd1b 100644 --- a/qutebrowser/qt/webenginecore.py +++ b/qutebrowser/qt/webenginecore.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring,import-error,wildcard-import,unused-wildcard-import,unused-import +# flake8: noqa + from qutebrowser.qt import machinery diff --git a/qutebrowser/qt/webenginewidgets.py b/qutebrowser/qt/webenginewidgets.py index 76cea3438..784e780db 100644 --- a/qutebrowser/qt/webenginewidgets.py +++ b/qutebrowser/qt/webenginewidgets.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring,import-error,wildcard-import,unused-wildcard-import +# flake8: noqa + from qutebrowser.qt import machinery diff --git a/qutebrowser/qt/webkit.py b/qutebrowser/qt/webkit.py index 15f2bbf98..d608584f0 100644 --- a/qutebrowser/qt/webkit.py +++ b/qutebrowser/qt/webkit.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring,wildcard-import +# flake8: noqa + from qutebrowser.qt import machinery diff --git a/qutebrowser/qt/webkitwidgets.py b/qutebrowser/qt/webkitwidgets.py index 3ae74c3c9..c846331b1 100644 --- a/qutebrowser/qt/webkitwidgets.py +++ b/qutebrowser/qt/webkitwidgets.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring,wildcard-import +# flake8: noqa + from qutebrowser.qt import machinery diff --git a/qutebrowser/qt/widgets.py b/qutebrowser/qt/widgets.py index 5fb4ee92b..1d06f168d 100644 --- a/qutebrowser/qt/widgets.py +++ b/qutebrowser/qt/widgets.py @@ -1,3 +1,8 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: +# FIXME:qt6 +# pylint: disable=missing-module-docstring,import-error,wildcard-import,unused-wildcard-import +# flake8: noqa + from qutebrowser.qt import machinery diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index 0fb2e1a10..bb22f4b70 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -1004,6 +1004,8 @@ def opengl_info() -> Optional[OpenGLInfo]: # pragma: no cover vf = ctx.versionFunctions(vp) except AttributeError: # Qt 6 + # FIXME:qt6 + # pylint: disable-next=no-name-in-module from qutebrowser.qt.opengl import QOpenGLVersionFunctionsFactory vf = QOpenGLVersionFunctionsFactory.get(vp, ctx) except ImportError as e: diff --git a/tests/unit/browser/webkit/test_tabhistory.py b/tests/unit/browser/webkit/test_tabhistory.py index 852b5c101..f143e5953 100644 --- a/tests/unit/browser/webkit/test_tabhistory.py +++ b/tests/unit/browser/webkit/test_tabhistory.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. +# FIXME:qt6 +# pylint: disable=no-name-in-module + """Tests for webelement.tabhistory.""" import dataclasses diff --git a/tests/unit/javascript/test_js_execution.py b/tests/unit/javascript/test_js_execution.py index 4556066c0..d83a54ade 100644 --- a/tests/unit/javascript/test_js_execution.py +++ b/tests/unit/javascript/test_js_execution.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see <https://www.gnu.org/licenses/>. +# FIXME:qt6 +# pylint: disable=no-name-in-module + """Check how Qt behaves when trying to execute JS.""" |