qt: Fix typing/lint
This commit is contained in:
parent
eeb39d6330
commit
8fdb5b09be
|
|
@ -146,7 +146,7 @@ def init(args: Optional[argparse.Namespace] = None) -> None:
|
|||
else:
|
||||
# Explicit initialization can happen exactly once, and if it's used, there
|
||||
# should not be any implicit initialization (qutebrowser.qt imports) before it.
|
||||
if _initialized:
|
||||
if _initialized: # pylint: disable=else-if-used
|
||||
raise Error("init() already called before application init")
|
||||
_initialized = True
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
|
||||
# pylint: disable=import-error,wildcard-import,unused-wildcard-import
|
||||
# pylint: disable=wildcard-import,unused-wildcard-import
|
||||
|
||||
"""Wrapped Qt imports for PyQt5.sip/PyQt6.sip.
|
||||
|
||||
|
|
@ -32,6 +32,6 @@ elif machinery.USE_PYQT6:
|
|||
# While upstream recommends using PyQt5.sip ever since PyQt5 5.11, some
|
||||
# distributions still package later versions of PyQt5 with a top-level
|
||||
# "sip" rather than "PyQt5.sip".
|
||||
from sip import * # type: ignore[import]
|
||||
from sip import *
|
||||
else:
|
||||
raise machinery.UnknownWrapper()
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
import sys
|
||||
import argparse
|
||||
import typing
|
||||
from typing import Any, Optional
|
||||
from typing import Any, Optional, Dict, List
|
||||
|
||||
import pytest
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ def modules():
|
|||
|
||||
def test_autoselect_none_available(
|
||||
stubs: Any,
|
||||
modules: dict[str, bool],
|
||||
modules: Dict[str, bool],
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
):
|
||||
stubs.ImportFake(modules, monkeypatch).patch()
|
||||
|
|
@ -62,8 +62,8 @@ def test_autoselect_none_available(
|
|||
)
|
||||
def test_autoselect(
|
||||
stubs: Any,
|
||||
modules: dict[str, bool],
|
||||
available: list[str],
|
||||
modules: Dict[str, bool],
|
||||
available: List[str],
|
||||
expected: str,
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
):
|
||||
|
|
|
|||
Loading…
Reference in New Issue