From 2b9f337758b5b47b584c74cde0b7d7897db9d5af Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 15 Jun 2014 11:36:28 +0200 Subject: [PATCH] Fix lint --- .flake8 | 22 +++++++++++----------- qutebrowser/utils/misc.py | 6 ++++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.flake8 b/.flake8 index 277a4c491..9807ac951 100644 --- a/.flake8 +++ b/.flake8 @@ -1,11 +1,11 @@ -[flake8] -# E241: Multiple spaces after , -# E265: Block comment should start with '#' -# checked by pylint: -# F401: Unused import -# E501: Line too long -# F821: undefined name -# F841: unused variable -ignore=E241,E265,F401,E501,F821,F841 -max_complexity = 11 -exclude = ez_setup.py +[flake8] +# E241: Multiple spaces after , +# E265: Block comment should start with '#' +# checked by pylint: +# F401: Unused import +# E501: Line too long +# F821: undefined name +# F841: unused variable +ignore=E241,E265,F401,E501,F821,F841 +max_complexity = 12 +exclude = ez_setup.py diff --git a/qutebrowser/utils/misc.py b/qutebrowser/utils/misc.py index 4c2da4fbb..e73ae68ab 100644 --- a/qutebrowser/utils/misc.py +++ b/qutebrowser/utils/misc.py @@ -388,8 +388,9 @@ def format_size(size, base=1024, suffix=''): class EventLoop(QEventLoop): - """A thin wrapper around QEventLoop which raises an exception when doing - exec_() multiple times. + """A thin wrapper around QEventLoop. + + Raises an exception when doing exec_() multiple times. """ def __init__(self, parent=None): @@ -397,6 +398,7 @@ class EventLoop(QEventLoop): self._executing = False def exec_(self, flags=QEventLoop.AllEvents): + """Override exec_ to raise an exception when re-running.""" if self._executing: raise AssertionError("Eventloop is already running!") self._executing = True