Fix lint
This commit is contained in:
parent
fa79212fea
commit
2b9f337758
2
.flake8
2
.flake8
@ -7,5 +7,5 @@
|
|||||||
# F821: undefined name
|
# F821: undefined name
|
||||||
# F841: unused variable
|
# F841: unused variable
|
||||||
ignore=E241,E265,F401,E501,F821,F841
|
ignore=E241,E265,F401,E501,F821,F841
|
||||||
max_complexity = 11
|
max_complexity = 12
|
||||||
exclude = ez_setup.py
|
exclude = ez_setup.py
|
||||||
|
@ -388,8 +388,9 @@ def format_size(size, base=1024, suffix=''):
|
|||||||
|
|
||||||
class EventLoop(QEventLoop):
|
class EventLoop(QEventLoop):
|
||||||
|
|
||||||
"""A thin wrapper around QEventLoop which raises an exception when doing
|
"""A thin wrapper around QEventLoop.
|
||||||
exec_() multiple times.
|
|
||||||
|
Raises an exception when doing exec_() multiple times.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
@ -397,6 +398,7 @@ class EventLoop(QEventLoop):
|
|||||||
self._executing = False
|
self._executing = False
|
||||||
|
|
||||||
def exec_(self, flags=QEventLoop.AllEvents):
|
def exec_(self, flags=QEventLoop.AllEvents):
|
||||||
|
"""Override exec_ to raise an exception when re-running."""
|
||||||
if self._executing:
|
if self._executing:
|
||||||
raise AssertionError("Eventloop is already running!")
|
raise AssertionError("Eventloop is already running!")
|
||||||
self._executing = True
|
self._executing = True
|
||||||
|
Loading…
Reference in New Issue
Block a user