mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
fix problems with decorators with call signatures, fixes #319
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user