From 342cd9585ad3b7a3dbb6a205e705b8984ea4bb72 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 24 Jun 2023 20:14:53 +0200 Subject: Fix mypy --- qutebrowser/qt/machinery.py | 3 +-- tests/unit/test_qt_machinery.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/qutebrowser/qt/machinery.py b/qutebrowser/qt/machinery.py index 3fdb4efb4..c737fa96f 100644 --- a/qutebrowser/qt/machinery.py +++ b/qutebrowser/qt/machinery.py @@ -178,8 +178,7 @@ def _select_wrapper(args: Optional[argparse.Namespace]) -> SelectionInfo: return SelectionInfo(wrapper=env_wrapper, reason=SelectionReason.env) if _WRAPPER_OVERRIDE is not None: - pass # type: ignore[unreachable] - assert _WRAPPER_OVERRIDE in WRAPPERS, _WRAPPER_OVERRIDE + assert _WRAPPER_OVERRIDE in WRAPPERS # type: ignore[unreachable] return SelectionInfo(wrapper=_WRAPPER_OVERRIDE, reason=SelectionReason.override) return _autoselect_wrapper() diff --git a/tests/unit/test_qt_machinery.py b/tests/unit/test_qt_machinery.py index b144af030..e455ba9ca 100644 --- a/tests/unit/test_qt_machinery.py +++ b/tests/unit/test_qt_machinery.py @@ -380,7 +380,7 @@ class TestSelectWrapper: def test_invalid_override(self, monkeypatch: pytest.MonkeyPatch): monkeypatch.setattr(machinery, "_WRAPPER_OVERRIDE", "invalid") - with pytest.raises(AssertionError, match="invalid"): + with pytest.raises(AssertionError): machinery._select_wrapper(args=None) -- cgit v1.2.3-54-g00ecf