diff --git a/jedi/parsing.py b/jedi/parsing.py index eb29b9dd..c9e60259 100644 --- a/jedi/parsing.py +++ b/jedi/parsing.py @@ -665,7 +665,7 @@ class Parser(object): stmt, tok = self._parse_statement() if stmt is not None: stmt.parent = use_as_parent_scope - self._scope.asserts.append(stmt) + self._scope.asserts.append(stmt) # default elif token_type in [tokenize.NAME, tokenize.STRING, tokenize.NUMBER] \ diff --git a/test/completion/invalid.py b/test/completion/invalid.py index d98ba0a9..d10c08e4 100644 --- a/test/completion/invalid.py +++ b/test/completion/invalid.py @@ -141,10 +141,16 @@ a[0] int()). # ----------------- -# goto +# keywords # ----------------- #! [] as +def empty_assert(): + x = 3 + assert + #? int() + x + import datetime as