mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-10 14:02:27 +08:00
Small issue with is_definition and params. Found by looking at stdlib/random.choice tests.
This commit is contained in:
@@ -286,7 +286,7 @@ class Name(Leaf):
|
||||
def is_definition(self):
|
||||
stmt = self.get_definition()
|
||||
if isinstance(stmt, (Function, Class, Module)):
|
||||
return True
|
||||
return self == stmt.name
|
||||
elif isinstance(stmt, ForStmt):
|
||||
return self.start_pos < stmt.children[2].start_pos
|
||||
elif isinstance(stmt, Param):
|
||||
|
||||
Reference in New Issue
Block a user