mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-20 15:29:41 +08:00
Rename Name.get_parent_stmt to Name.get_definition, because it's not always a statement. Also start using it in the NameFinder.
This commit is contained in:
@@ -85,7 +85,7 @@ class NameFinder(object):
|
||||
if unicode(self.name_str) != name.get_code():
|
||||
continue
|
||||
|
||||
stmt = name.parent
|
||||
stmt = name.get_definition()
|
||||
scope = stmt.parent
|
||||
if scope in break_scopes:
|
||||
continue
|
||||
@@ -219,7 +219,7 @@ class NameFinder(object):
|
||||
flow_scope = flow_scope.parent
|
||||
|
||||
for name in names:
|
||||
typ = name.parent
|
||||
typ = name.get_definition()
|
||||
if typ.isinstance(pr.ForFlow):
|
||||
types += self._handle_for_loops(typ)
|
||||
elif isinstance(typ, pr.Param):
|
||||
|
||||
Reference in New Issue
Block a user