mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24:27 +08:00
Make sure that equals will only be added to keyword arguments and not just randomly
This commit is contained in:
@@ -8,7 +8,7 @@ Named Params:
|
||||
def a(abc):
|
||||
pass
|
||||
|
||||
#? 5 ['abc']
|
||||
#? 5 ['abc=']
|
||||
a(abc)
|
||||
|
||||
|
||||
@@ -24,14 +24,14 @@ a(some_kwargs)
|
||||
def multiple(foo, bar):
|
||||
pass
|
||||
|
||||
#? 17 ['bar']
|
||||
#? 17 ['bar=']
|
||||
multiple(foo, bar)
|
||||
|
||||
#? ['bar']
|
||||
#? ['bar=']
|
||||
multiple(foo, bar
|
||||
|
||||
my_lambda = lambda lambda_param: lambda_param + 1
|
||||
#? 22 ['lambda_param']
|
||||
#? 22 ['lambda_param=']
|
||||
my_lambda(lambda_param)
|
||||
|
||||
# __call__ / __init__
|
||||
@@ -45,15 +45,15 @@ class Test(object):
|
||||
def test(self, blub):
|
||||
pass
|
||||
|
||||
#? 10 ['hello_other']
|
||||
#? 10 ['hello_other=']
|
||||
Test(hello=)
|
||||
#? 12 ['hello']
|
||||
#? 12 ['hello=']
|
||||
Test()(hello=)
|
||||
#? 11 []
|
||||
Test()(self=)
|
||||
#? 16 []
|
||||
Test().test(self=)
|
||||
#? 16 ['blub']
|
||||
#? 16 ['blub=']
|
||||
Test().test(blub=)
|
||||
|
||||
# builtins
|
||||
@@ -65,7 +65,7 @@ any(iterable=)
|
||||
def foo(xyz):
|
||||
pass
|
||||
|
||||
#? 7 ['xyz']
|
||||
#? 7 ['xyz=']
|
||||
foo(xyz)
|
||||
# No completion should be possible if it's not a simple name
|
||||
#? 17 []
|
||||
@@ -81,11 +81,11 @@ x = " "; foo(xyz[xyz)
|
||||
#? 20 []
|
||||
x = " "; foo(xyz[(xyz)
|
||||
|
||||
#? 8 ['xyz']
|
||||
#? 8 ['xyz=']
|
||||
@foo(xyz)
|
||||
def x(): pass
|
||||
|
||||
@str
|
||||
#? 8 ['xyz']
|
||||
#? 8 ['xyz=']
|
||||
@foo(xyz)
|
||||
def x(): pass
|
||||
|
||||
Reference in New Issue
Block a user