mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-16 08:56:44 +08:00
introduced a dynamic completion for params
This commit is contained in:
14
test/completion/dynamic.py
Normal file
14
test/completion/dynamic.py
Normal file
@@ -0,0 +1,14 @@
|
||||
"""
|
||||
This is used for dynamic object completion.
|
||||
Jedi tries to guess the types with a backtracking approach.
|
||||
"""
|
||||
def func(a):
|
||||
#? int() str()
|
||||
return a
|
||||
|
||||
#? int()
|
||||
func(1)
|
||||
|
||||
func
|
||||
|
||||
int(1) + (int(2))+ func('')
|
||||
@@ -70,6 +70,12 @@ def a(a=3):
|
||||
a(2)
|
||||
#? []
|
||||
a(2).func
|
||||
|
||||
a_param = 3
|
||||
def func(a_param):
|
||||
# should not be int
|
||||
#? []
|
||||
a_param.
|
||||
# -----------------
|
||||
# class
|
||||
# -----------------
|
||||
|
||||
Reference in New Issue
Block a user