forked from VimPlug/jedi
temporary solution for completions in asserts
This commit is contained in:
@@ -566,6 +566,7 @@ class Parser(object):
|
|||||||
stmt, tok = self._parse_statement()
|
stmt, tok = self._parse_statement()
|
||||||
if stmt is not None:
|
if stmt is not None:
|
||||||
stmt.parent = use_as_parent_scope
|
stmt.parent = use_as_parent_scope
|
||||||
|
self._scope.statements.append(stmt)
|
||||||
self._scope.asserts.append(stmt)
|
self._scope.asserts.append(stmt)
|
||||||
elif tok_str in STATEMENT_KEYWORDS:
|
elif tok_str in STATEMENT_KEYWORDS:
|
||||||
stmt, _ = self._parse_statement()
|
stmt, _ = self._parse_statement()
|
||||||
|
|||||||
@@ -820,6 +820,9 @@ class KeywordStatement(Base):
|
|||||||
if stmt is not None:
|
if stmt is not None:
|
||||||
stmt.parent = self
|
stmt.parent = self
|
||||||
|
|
||||||
|
def is_scope(self):
|
||||||
|
return False
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<%s(%s): %s>" % (type(self).__name__, self.name, self.stmt)
|
return "<%s(%s): %s>" % (type(self).__name__, self.name, self.stmt)
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,14 @@ def func():
|
|||||||
#? int() str()
|
#? int() str()
|
||||||
func()
|
func()
|
||||||
|
|
||||||
|
# -----------------
|
||||||
|
# keywords
|
||||||
|
# -----------------
|
||||||
|
|
||||||
|
#? list()
|
||||||
|
assert []
|
||||||
|
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# for loops
|
# for loops
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|||||||
Reference in New Issue
Block a user