forked from VimPlug/jedi
fix end_pos stuff in parser (no (None, None) end_pos anymore
This commit is contained in:
@@ -430,8 +430,11 @@ class Parser(object):
|
||||
except (StopIteration, common.MultiLevelStopIteration):
|
||||
# on finish, set end_pos correctly
|
||||
s = self.scope
|
||||
while s is not None and not (isinstance(s, pr.Module)
|
||||
and not isinstance(s, pr.SubModule)):
|
||||
while s is not None:
|
||||
if isinstance(s, pr.Module) \
|
||||
and not isinstance(s, pr.SubModule):
|
||||
self.module.end_pos = self.end_pos
|
||||
break
|
||||
s.end_pos = self.end_pos
|
||||
s = s.parent
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user