forked from VimPlug/jedi
support tuple-assignment
This commit is contained in:
+5
-1
@@ -514,7 +514,7 @@ class BaseNode(Base):
|
||||
|
||||
def last_leaf(self):
|
||||
try:
|
||||
return self.children[-1].first_leaf()
|
||||
return self.children[-1].last_leaf()
|
||||
except AttributeError:
|
||||
return self.children[-1]
|
||||
|
||||
@@ -527,6 +527,10 @@ class BaseNode(Base):
|
||||
whitespace = self.last_leaf().get_next().prefix
|
||||
except AttributeError:
|
||||
return None
|
||||
except ValueError:
|
||||
# in some particular cases, the tree doesn't seem to be linked
|
||||
# correctly
|
||||
return None
|
||||
if "#" not in whitespace:
|
||||
return None
|
||||
comment = whitespace[whitespace.index("#"):]
|
||||
|
||||
Reference in New Issue
Block a user