diff options
author | Florian Bruhin <me@the-compiler.org> | 2023-06-23 23:38:22 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2023-06-30 19:29:28 +0200 |
commit | ad77048d530aefeecdd1c784accaddb929f8bdc6 (patch) | |
tree | 7698458269c01d3b04c052853761dd59d39d685d | |
parent | 73b51d274fc151a7bd2c86c5e5eda90cf065bc9b (diff) | |
download | qutebrowser-ad77048d530aefeecdd1c784accaddb929f8bdc6.tar.gz qutebrowser-ad77048d530aefeecdd1c784accaddb929f8bdc6.zip |
qt: blackify
-rw-r--r-- | qutebrowser/qt/machinery.py | 9 | ||||
-rw-r--r-- | tests/unit/test_qt_machinery.py | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/qutebrowser/qt/machinery.py b/qutebrowser/qt/machinery.py index 4e88a0634..bd5062120 100644 --- a/qutebrowser/qt/machinery.py +++ b/qutebrowser/qt/machinery.py @@ -168,8 +168,10 @@ def _select_wrapper(args: Optional[argparse.Namespace]) -> SelectionInfo: if env_wrapper == "auto": return _autoselect_wrapper() elif env_wrapper not in WRAPPERS: - raise Error(f"Unknown wrapper {env_wrapper} set via {env_var}, " - f"allowed: {', '.join(WRAPPERS)}") + raise Error( + f"Unknown wrapper {env_wrapper} set via {env_var}, " + f"allowed: {', '.join(WRAPPERS)}" + ) return SelectionInfo(wrapper=env_wrapper, reason=SelectionReason.env) # FIXME:qt6 Go back to the auto-detection once ready @@ -217,8 +219,7 @@ def _set_globals(info: SelectionInfo) -> None: Those are split into multiple global variables because that way we can teach mypy about them via --always-true and --always-false, see tox.ini. """ - global INFO, USE_PYQT5, USE_PYQT6, USE_PYSIDE6, IS_QT5, IS_QT6, \ - IS_PYQT, IS_PYSIDE, _initialized + global INFO, USE_PYQT5, USE_PYQT6, USE_PYSIDE6, IS_QT5, IS_QT6, IS_PYQT, IS_PYSIDE, _initialized assert info.wrapper is not None, info assert not _initialized diff --git a/tests/unit/test_qt_machinery.py b/tests/unit/test_qt_machinery.py index 1618e9e6f..b4d302ae5 100644 --- a/tests/unit/test_qt_machinery.py +++ b/tests/unit/test_qt_machinery.py @@ -214,7 +214,7 @@ def modules(): reason=machinery.SelectionReason.auto, outcomes={ "PyQt6": "ImportError: Fake ImportError for PyQt6.", - } + }, ), id="import-error", ), @@ -403,7 +403,7 @@ class TestInit: reason=machinery.SelectionReason.auto, outcomes={ "PyQt6": "ImportError: Fake ImportError for PyQt6.", - } + }, ) @pytest.mark.parametrize( |