i3-companion: simplify static decorator

This commit is contained in:
Vincent Bernat 2021-08-05 20:48:06 +02:00
parent 38f4f5b1a4
commit 66f8fcbef7

View file

@ -130,8 +130,7 @@ def static(**kwargs):
"""Define static variables for the event handler."""
def decorator(fn):
for k, v in kwargs.items():
setattr(fn, k, v)
fn.__dict__.update(kwargs)
return fn
return decorator