diff --git a/qutebrowser/utils/debug.py b/qutebrowser/utils/debug.py index 06bdd2909..2868d8390 100644 --- a/qutebrowser/utils/debug.py +++ b/qutebrowser/utils/debug.py @@ -87,10 +87,11 @@ def log_signals(obj): return ret obj.__init__ = new_init - return obj else: connect_log_slot(obj) + return obj + def qenum_key(base, value, add_base=False, klass=None): """Convert a Qt Enum value to its key as a string. diff --git a/tests/unit/mainwindow/statusbar/test_textbase.py b/tests/unit/mainwindow/statusbar/test_textbase.py index c73a87831..9299e3a5f 100644 --- a/tests/unit/mainwindow/statusbar/test_textbase.py +++ b/tests/unit/mainwindow/statusbar/test_textbase.py @@ -63,7 +63,7 @@ def test_settext_empty(mocker, qtbot): autospec=True) label.setText('') - label.repaint.assert_called_with() + label.repaint.assert_called_with() # pylint: disable=no-member def test_resize(qtbot): @@ -92,7 +92,7 @@ def test_text_elide_none(mocker, qtbot): 'fontMetrics') label._update_elided_text(20) - assert not label.fontMetrics.called + assert not label.fontMetrics.called # pylint: disable=no-member def test_unset_text(qtbot):