From 3c1c867b5f59397757dfec65d98d96e15b7de6e2 Mon Sep 17 00:00:00 2001 From: Erez Shinan Date: Wed, 17 Oct 2018 11:42:28 +0300 Subject: [PATCH] Fixed commit 216c341 (Issue #246, #249) --- lark/visitors.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lark/visitors.py b/lark/visitors.py index ad34327..0cd5e05 100644 --- a/lark/visitors.py +++ b/lark/visitors.py @@ -69,9 +69,8 @@ class Transformer: if name.startswith('_') or name in libmembers: continue - if isinstance(cls.__dict__[name], (staticmethod, classmethod)): - kwargs['static'] = True - setattr(cls, name, decorator(value, **kwargs)) + static = isinstance(cls.__dict__[name], (staticmethod, classmethod)) + setattr(cls, name, decorator(value, static=static, **kwargs)) return cls