1
0
forked from VimPlug/jedi

Fix except statements names.

This commit is contained in:
Dave Halter
2014-11-13 01:02:45 +01:00
parent 2fc67b97e5
commit 1ab67ebbba
2 changed files with 9 additions and 14 deletions

View File

@@ -275,6 +275,8 @@ class Name(Leaf):
return self.start_pos < stmt.children[2].start_pos
elif isinstance(stmt, Param):
return self == stmt.get_name()
elif isinstance(stmt, TryStmt):
return self.prev_sibling() == 'as'
else:
return isinstance(stmt, (ExprStmt, Import, CompFor)) \
and self in stmt.get_defined_names()