1
0
forked from VimPlug/jedi

Add partialmethod, fixes #1519

Returns correct method signature but test/completion/stdlib.py fails
This commit is contained in:
Daniel Lemm
2020-03-12 18:40:28 +01:00
parent 8df917f1df
commit 96c969687a
3 changed files with 86 additions and 0 deletions

View File

@@ -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):