Fix lint
This commit is contained in:
parent
fa79212fea
commit
2b9f337758
22
.flake8
22
.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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user