forked from VimPlug/jedi
Add partialmethod, fixes #1519
Returns correct method signature but test/completion/stdlib.py fails
This commit is contained in:
@@ -158,6 +158,23 @@ tup[0]
|
||||
#? float()
|
||||
tup[1]
|
||||
|
||||
class X:
|
||||
def function(self, a, b):
|
||||
return a, b
|
||||
a = functools.partialmethod(function, 0)
|
||||
kw = functools.partialmethod(function, b=1.0)
|
||||
|
||||
#? int()
|
||||
X().a('')[0]
|
||||
#? str()
|
||||
X().a('')[1]
|
||||
|
||||
tup = X().kw(1)
|
||||
#? int()
|
||||
tup[0]
|
||||
#? float()
|
||||
tup[1]
|
||||
|
||||
def my_decorator(f):
|
||||
@functools.wraps(f)
|
||||
def wrapper(*args, **kwds):
|
||||
|
||||
Reference in New Issue
Block a user