mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-24 17:28:36 +08:00
fixed ordering.py tests
This commit is contained in:
+5
-3
@@ -133,7 +133,9 @@ def search_params(param):
|
|||||||
|
|
||||||
for stmt in possible_stmts:
|
for stmt in possible_stmts:
|
||||||
if not isinstance(stmt, pr.Import):
|
if not isinstance(stmt, pr.Import):
|
||||||
calls = _scan_array(stmt.get_commands(), func_name)
|
arr = [c for c in stmt.get_commands()
|
||||||
|
if isinstance(c, pr.Statement)]
|
||||||
|
calls = _scan_array(arr, func_name)
|
||||||
for c in calls:
|
for c in calls:
|
||||||
# no execution means that params cannot be set
|
# no execution means that params cannot be set
|
||||||
call_path = c.generate_call_path()
|
call_path = c.generate_call_path()
|
||||||
@@ -157,7 +159,8 @@ def search_params(param):
|
|||||||
|
|
||||||
# get the param name
|
# get the param name
|
||||||
if param.assignment_details:
|
if param.assignment_details:
|
||||||
commands = param.assignment_details[0]
|
# first assignment details, others would be a syntax error
|
||||||
|
commands, op = param.assignment_details[0]
|
||||||
else:
|
else:
|
||||||
commands = param.get_commands()
|
commands = param.get_commands()
|
||||||
offset = 1 if commands[0] in ['*', '**'] else 0
|
offset = 1 if commands[0] in ['*', '**'] else 0
|
||||||
@@ -194,7 +197,6 @@ def check_array_additions(array):
|
|||||||
|
|
||||||
def _scan_array(arr, search_name):
|
def _scan_array(arr, search_name):
|
||||||
""" Returns the function Call that match search_name in an Array. """
|
""" Returns the function Call that match search_name in an Array. """
|
||||||
print arr
|
|
||||||
result = []
|
result = []
|
||||||
for stmt in arr:
|
for stmt in arr:
|
||||||
for s in stmt.get_commands():
|
for s in stmt.get_commands():
|
||||||
|
|||||||
Reference in New Issue
Block a user