From f6dffa74b67f1d651bcf350f95b9f68795fa530f Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 27 Nov 2014 22:27:13 +0100 Subject: [PATCH] Fix lint --- qutebrowser/test/utils/test_utils.py | 6 ++++-- qutebrowser/widgets/statusbar/bar.py | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qutebrowser/test/utils/test_utils.py b/qutebrowser/test/utils/test_utils.py index 5e9e2ff0b..5ad237771 100644 --- a/qutebrowser/test/utils/test_utils.py +++ b/qutebrowser/test/utils/test_utils.py @@ -345,9 +345,11 @@ class RaisesTests(unittest.TestCase): """Test raises.""" def do_raise(self): + """Helper function which raises an exception.""" raise Exception def do_nothing(self): + """Helper function which does nothing.""" pass def test_raises_single_exc_true(self): @@ -367,11 +369,11 @@ class RaisesTests(unittest.TestCase): """Test raises with multiple exceptions which do not get raised.""" self.assertFalse(utils.raises((ValueError, TypeError), int, '1')) - def test_no_args(self): + def test_no_args_true(self): """Test with no args and an exception which gets raised.""" self.assertTrue(utils.raises(Exception, self.do_raise)) - def test_no_args(self): + def test_no_args_false(self): """Test with no args and an exception which does not get raised.""" self.assertFalse(utils.raises(Exception, self.do_nothing)) diff --git a/qutebrowser/widgets/statusbar/bar.py b/qutebrowser/widgets/statusbar/bar.py index f586238a6..0fdfbb5ab 100644 --- a/qutebrowser/widgets/statusbar/bar.py +++ b/qutebrowser/widgets/statusbar/bar.py @@ -20,7 +20,6 @@ """The main statusbar widget.""" import collections -import datetime from PyQt5.QtCore import pyqtSignal, pyqtSlot, pyqtProperty, Qt, QTime from PyQt5.QtWidgets import QWidget, QHBoxLayout, QStackedLayout, QSizePolicy @@ -317,7 +316,6 @@ class StatusBar(QWidget): """ log.statusbar.debug("Displaying text: {} (error={})".format( text, error)) - now = datetime.datetime.now() mindelta = config.get('ui', 'message-timeout') if self._stopwatch.isNull(): delta = None