forked from VimPlug/jedi
Improve Name.is_definition
This commit is contained in:
@@ -255,8 +255,11 @@ class Name(Leaf):
|
|||||||
|
|
||||||
def is_definition(self):
|
def is_definition(self):
|
||||||
stmt = self.get_definition()
|
stmt = self.get_definition()
|
||||||
return isinstance(stmt, (ExprStmt, Import)) \
|
if isinstance(stmt, (Function, Class, Module)):
|
||||||
and self in stmt.get_defined_names()
|
return True
|
||||||
|
else:
|
||||||
|
return isinstance(stmt, (ExprStmt, Import)) \
|
||||||
|
and self in stmt.get_defined_names()
|
||||||
|
|
||||||
def assignment_indexes(self):
|
def assignment_indexes(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user