forked from VimPlug/jedi
Get a first local test passing.
This commit is contained in:
@@ -126,9 +126,8 @@ class Evaluator(object):
|
|||||||
:param stmt: A `pr.ExprStmt`.
|
:param stmt: A `pr.ExprStmt`.
|
||||||
"""
|
"""
|
||||||
debug.dbg('eval_statement %s (%s)', stmt, seek_name)
|
debug.dbg('eval_statement %s (%s)', stmt, seek_name)
|
||||||
expression_list = stmt.expression_list()
|
|
||||||
if isinstance(stmt, FakeStatement):
|
if isinstance(stmt, FakeStatement):
|
||||||
return expression_list # Already contains the results.
|
return stmt.children # Already contains the results.
|
||||||
|
|
||||||
result = self.eval_element(stmt.children[0])
|
result = self.eval_element(stmt.children[0])
|
||||||
|
|
||||||
|
|||||||
@@ -310,7 +310,8 @@ class FakeImport(pr.Import):
|
|||||||
|
|
||||||
class FakeName(pr.Name):
|
class FakeName(pr.Name):
|
||||||
def __init__(self, name_str, parent=None, start_pos=(0, 0)):
|
def __init__(self, name_str, parent=None, start_pos=(0, 0)):
|
||||||
super(FakeName, self).__init__(FakeSubModule, name_str, parent, start_pos)
|
super(FakeName, self).__init__(name_str, start_pos)
|
||||||
|
self.parent = parent
|
||||||
|
|
||||||
def get_definition(self):
|
def get_definition(self):
|
||||||
return self.parent
|
return self.parent
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ class Base(object):
|
|||||||
class _Leaf(Base):
|
class _Leaf(Base):
|
||||||
__slots__ = ('value', 'parent', 'start_pos', 'prefix')
|
__slots__ = ('value', 'parent', 'start_pos', 'prefix')
|
||||||
|
|
||||||
def __init__(self, value, start_pos, prefix):
|
def __init__(self, value, start_pos, prefix=''):
|
||||||
self.value = value
|
self.value = value
|
||||||
self.start_pos = start_pos
|
self.start_pos = start_pos
|
||||||
self.prefix = prefix
|
self.prefix = prefix
|
||||||
@@ -1003,14 +1003,7 @@ class Statement(Simple, DocstringMixin):
|
|||||||
|
|
||||||
would result in ``[(Name(x), '='), (Array([Name(y), Name(z)]), '=')]``.
|
would result in ``[(Name(x), '='), (Array([Name(y), Name(z)]), '=')]``.
|
||||||
"""
|
"""
|
||||||
return self._assignment_details
|
return []
|
||||||
|
|
||||||
@cache.underscore_memoization
|
|
||||||
def expression_list(self):
|
|
||||||
"""
|
|
||||||
Parse a statement.
|
|
||||||
"""
|
|
||||||
return self.children
|
|
||||||
|
|
||||||
def set_expression_list(self, lst):
|
def set_expression_list(self, lst):
|
||||||
"""It's necessary for some "hacks" to change the expression_list."""
|
"""It's necessary for some "hacks" to change the expression_list."""
|
||||||
|
|||||||
Reference in New Issue
Block a user