diff --git a/jedi/fast_parser.py b/jedi/fast_parser.py index 7e58f08a..37c22d30 100644 --- a/jedi/fast_parser.py +++ b/jedi/fast_parser.py @@ -351,12 +351,12 @@ class FastParser(use_metaclass(CachedFastParser)): else: if node is None: self.current_node = \ - self.current_node.add_parser(p, code_part) + self.current_node.add_parser(p, code_part) else: self.current_node = self.current_node.add_node(node) if self.current_node.parent and (isinstance(p.user_scope, - pr.SubModule) or p.user_scope is None) \ + pr.SubModule) or p.user_scope is None) \ and self.user_position \ and p.start_pos <= self.user_position < p.end_pos: p.user_scope = self.current_node.parent.content_scope