mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-30 16:54:20 +08:00
fix problem that strings are no function calls
This commit is contained in:
@@ -123,7 +123,7 @@ def search_function_definition(stmt, pos):
|
||||
while isinstance(call.parent, pr.Call):
|
||||
call = call.parent
|
||||
arr.parent.execution = None
|
||||
return call, index, False
|
||||
return call if call.type == pr.Call.NAME else None, index, 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.
|
||||
"""
|
||||
|
||||
# wait until keywords are out of definitions (pydoc function).
|
||||
##? 5
|
||||
's'()
|
||||
|
||||
#? ['upper']
|
||||
str()).upper
|
||||
|
||||
# -----------------
|
||||
# funcs
|
||||
# -----------------
|
||||
def asdf(a or b): # multiple param names
|
||||
return a
|
||||
|
||||
#? int()
|
||||
asdf(2)
|
||||
|
||||
from a import (b
|
||||
def blub():
|
||||
return 0
|
||||
@@ -83,6 +96,10 @@ for_local
|
||||
for_local
|
||||
|
||||
|
||||
# -----------------
|
||||
# list comprehensions
|
||||
# -----------------
|
||||
|
||||
a2 = [for a2 in [0]]
|
||||
#?
|
||||
a2[0]
|
||||
@@ -113,12 +130,6 @@ a[0]
|
||||
#? []
|
||||
int()).
|
||||
|
||||
def asdf(a or b): # multiple param names
|
||||
return a
|
||||
|
||||
#? int()
|
||||
asdf(2)
|
||||
|
||||
# -----------------
|
||||
# goto
|
||||
# -----------------
|
||||
|
||||
Reference in New Issue
Block a user