1
0
forked from VimPlug/jedi

support tuple-assignment

This commit is contained in:
Claude
2016-02-15 17:04:19 +01:00
parent a658f7940c
commit 8b28678d19
4 changed files with 62 additions and 5 deletions
+5 -1
View File
@@ -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("#"):]