WIP: Avoid linter issues with temporary Qt wrappers

This commit is contained in:
Florian Bruhin 2022-05-17 11:44:15 +02:00
parent 5aa9cb7401
commit ebdf248e44
26 changed files with 111 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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}")

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1005,6 +1005,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:

View File

@ -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

View File

@ -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."""