1
0
forked from VimPlug/jedi

Statement -> ExprStmt.

This commit is contained in:
Dave Halter
2014-12-15 16:18:09 +01:00
parent 9431d89797
commit af303e10c8
5 changed files with 19 additions and 68 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ def deep_ast_copy(obj, new_elements_default=None, check_first=False):
new_obj = copy.copy(obj)
new_elements[obj] = new_obj
if isinstance(obj, pr.Statement):
if isinstance(obj, pr.ExprStmt):
# Need to set _set_vars, otherwise the cache is not working
# correctly, don't know exactly why.
obj.get_defined_names()
@@ -50,7 +50,7 @@ def deep_ast_copy(obj, new_elements_default=None, check_first=False):
except AttributeError:
pass
if isinstance(obj, pr.Statement):
if isinstance(obj, pr.ExprStmt):
# We need to process something with priority for statements,
# because there are several references that don't walk the whole
# tree in there.
+2 -2
View File
@@ -90,7 +90,7 @@ class Arguments(pr.Base):
named_index = None
new_args = []
for i, stmt in enumerate(var_args):
if isinstance(stmt, pr.Statement):
if isinstance(stmt, pr.ExprStmt):
if named_index is None and stmt.assignment_details:
named_index = i
@@ -362,7 +362,7 @@ def _unpack_var_args(evaluator, var_args, func):
# `var_args` is typically an Array, and not a list.
for stmt in _reorder_var_args(var_args.iterate()):
if not isinstance(stmt, pr.Statement):
if not isinstance(stmt, pr.ExprStmt):
if stmt is None:
argument_list.append((None, []))
# TODO generate warning?