diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index 61e35fd53..52100ae8a 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -91,15 +91,15 @@ def _parse_yaml_type( ) -> configtypes.BaseType: if isinstance(node, str): # e.g: - # type: Bool + # > type: Bool # -> create the type object without any arguments type_name = node kwargs = {} # type: typing.MutableMapping[str, typing.Any] elif isinstance(node, dict): # e.g: - # type: - # name: String - # none_ok: true + # > type: + # > name: String + # > none_ok: true # -> create the type object and pass arguments type_name = node.pop('name') kwargs = node diff --git a/qutebrowser/misc/checkpyver.py b/qutebrowser/misc/checkpyver.py index cf8e13810..641ccc5f8 100644 --- a/qutebrowser/misc/checkpyver.py +++ b/qutebrowser/misc/checkpyver.py @@ -31,7 +31,7 @@ except ImportError: # pragma: no cover try: # Python2 from Tkinter import Tk # type: ignore - import tkMessageBox as messagebox # type: ignore + import tkMessageBox as messagebox # type: ignore # noqa: N813 except ImportError: # Some Python without Tk Tk = None # type: ignore diff --git a/qutebrowser/utils/qtutils.py b/qutebrowser/utils/qtutils.py index 5373e76aa..520ced252 100644 --- a/qutebrowser/utils/qtutils.py +++ b/qutebrowser/utils/qtutils.py @@ -40,7 +40,7 @@ from PyQt5.QtCore import (qVersion, QEventLoop, QDataStream, QByteArray, try: from PyQt5.QtWebKit import qWebKitVersion except ImportError: # pragma: no cover - qWebKitVersion = None # type: ignore + qWebKitVersion = None # type: ignore # noqa: N816 MAXVALS = { diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index a52e31ed8..750a13383 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -42,7 +42,7 @@ from PyQt5.QtWidgets import QApplication try: from PyQt5.QtWebKit import qWebKitVersion except ImportError: # pragma: no cover - qWebKitVersion = None # type: ignore + qWebKitVersion = None # type: ignore # noqa: N816 try: from PyQt5.QtWebEngineWidgets import QWebEngineProfile diff --git a/tests/unit/completion/test_completionmodel.py b/tests/unit/completion/test_completionmodel.py index 24f5bdf0d..719a51016 100644 --- a/tests/unit/completion/test_completionmodel.py +++ b/tests/unit/completion/test_completionmodel.py @@ -41,7 +41,7 @@ def test_first_last_item(counts): cat = mock.Mock(spec=['layoutChanged', 'layoutAboutToBeChanged']) cat.rowCount = mock.Mock(return_value=c, spec=[]) model.add_category(cat) - data = [i for i, rowCount in enumerate(counts) if rowCount > 0] + data = [i for i, row_count in enumerate(counts) if row_count > 0] if not data: # with no items, first and last should be an invalid index assert not model.first_item().isValid() diff --git a/tests/unit/misc/test_ipc.py b/tests/unit/misc/test_ipc.py index 29ca0ff9d..dd2efcbb1 100644 --- a/tests/unit/misc/test_ipc.py +++ b/tests/unit/misc/test_ipc.py @@ -98,7 +98,7 @@ class FakeSocket(QObject): _connect_successful: The value returned for waitForConnected(). """ - readyRead = pyqtSignal() + readyRead = pyqtSignal() # noqa: N815 disconnected = pyqtSignal() def __init__(self, *, error=QLocalSocket.UnknownSocketError, state=None,