From 66f8fcbef7c6c6f9ba0244c1247a2b1972da11a5 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Thu, 5 Aug 2021 20:48:06 +0200 Subject: [PATCH] i3-companion: simplify static decorator --- bin/i3-companion | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/i3-companion b/bin/i3-companion index b878dcb..e51d720 100755 --- a/bin/i3-companion +++ b/bin/i3-companion @@ -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