From 353bc8d3958553fa511df0eb6b504cddef9a6abe Mon Sep 17 00:00:00 2001 From: Vincent Ardisson Date: Wed, 21 Aug 2019 17:19:06 +0200 Subject: [PATCH] weboob.browser.elements: add klass attribute to decorated @method @method wraps a class into a function, but then we cannot access the class anymore. For introspection, we expose it in a "klass" attribute. --- weboob/browser/elements.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/weboob/browser/elements.py b/weboob/browser/elements.py index 3e16b31902..d8514ddc67 100644 --- a/weboob/browser/elements.py +++ b/weboob/browser/elements.py @@ -88,6 +88,8 @@ def method(klass): def inner(self, *args, **kwargs): return klass(self)(*args, **kwargs) + + inner.klass = klass return inner -- GitLab