mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-19 23:09:43 +08:00
fix problem that strings are no function calls
This commit is contained in:
+1
-1
@@ -123,7 +123,7 @@ def search_function_definition(stmt, pos):
|
|||||||
while isinstance(call.parent, pr.Call):
|
while isinstance(call.parent, pr.Call):
|
||||||
call = call.parent
|
call = call.parent
|
||||||
arr.parent.execution = None
|
arr.parent.execution = None
|
||||||
return call, index, False
|
return call if call.type == pr.Call.NAME else None, index, False
|
||||||
return None, 0, False
|
return None, 0, False
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,22 @@ Basically this file could change depending on the current implementation. But
|
|||||||
there should never be any errors.
|
there should never be any errors.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# wait until keywords are out of definitions (pydoc function).
|
||||||
|
##? 5
|
||||||
|
's'()
|
||||||
|
|
||||||
#? ['upper']
|
#? ['upper']
|
||||||
str()).upper
|
str()).upper
|
||||||
|
|
||||||
|
# -----------------
|
||||||
|
# funcs
|
||||||
|
# -----------------
|
||||||
|
def asdf(a or b): # multiple param names
|
||||||
|
return a
|
||||||
|
|
||||||
|
#? int()
|
||||||
|
asdf(2)
|
||||||
|
|
||||||
from a import (b
|
from a import (b
|
||||||
def blub():
|
def blub():
|
||||||
return 0
|
return 0
|
||||||
@@ -83,6 +96,10 @@ for_local
|
|||||||
for_local
|
for_local
|
||||||
|
|
||||||
|
|
||||||
|
# -----------------
|
||||||
|
# list comprehensions
|
||||||
|
# -----------------
|
||||||
|
|
||||||
a2 = [for a2 in [0]]
|
a2 = [for a2 in [0]]
|
||||||
#?
|
#?
|
||||||
a2[0]
|
a2[0]
|
||||||
@@ -113,12 +130,6 @@ a[0]
|
|||||||
#? []
|
#? []
|
||||||
int()).
|
int()).
|
||||||
|
|
||||||
def asdf(a or b): # multiple param names
|
|
||||||
return a
|
|
||||||
|
|
||||||
#? int()
|
|
||||||
asdf(2)
|
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# goto
|
# goto
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|||||||
Reference in New Issue
Block a user