This commit is contained in:
Florian Bruhin 2014-06-15 11:36:28 +02:00
parent fa79212fea
commit 2b9f337758
2 changed files with 15 additions and 13 deletions

22
.flake8
View File

@ -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

View File

@ -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