fix problems with decorators with call signatures, fixes #319

This commit is contained in:
Dave Halter
2014-03-13 01:29:32 +01:00
parent 28d5da2f73
commit ec6d7df950
2 changed files with 3 additions and 2 deletions

View File

@@ -212,7 +212,8 @@ class InstanceElement(use_metaclass(CachedMetaClass, pr.Base)):
def get_decorated_func(self):
""" Needed because the InstanceElement should not be stripped """
func = self.var.get_decorated_func(self.instance)
func = self.var.get_decorated_func()
func = InstanceElement(self._evaluator, self.instance, func)
if func == self.var:
return self
return func

View File

@@ -157,4 +157,4 @@ class TestCallSignatures(TestCase):
signatures = Script(s).call_signatures()
assert len(signatures) == 1
x = [p.get_code() for p in signatures[0].params]
assert x == ['*args']
assert x == ['*args\n']