Don't use a list comprehension when we don't need the resulting list.
This commit is contained in:
parent
d4da08375b
commit
e1b74d0094
|
@ -270,7 +270,8 @@ def receiver(signal, **kwargs):
|
||||||
"""
|
"""
|
||||||
def _decorator(func):
|
def _decorator(func):
|
||||||
if isinstance(signal, (list, tuple)):
|
if isinstance(signal, (list, tuple)):
|
||||||
[s.connect(func, **kwargs) for s in signal]
|
for s in signal:
|
||||||
|
s.connect(func, **kwargs)
|
||||||
else:
|
else:
|
||||||
signal.connect(func, **kwargs)
|
signal.connect(func, **kwargs)
|
||||||
return func
|
return func
|
||||||
|
|
Loading…
Reference in New Issue