1
0
forked from VimPlug/jedi

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:
Dave Halter
2014-09-06 10:43:26 +02:00
parent 99116cdcb7
commit f57d9ef675
5 changed files with 26 additions and 9 deletions

View File

@@ -232,8 +232,9 @@ class ArrayMethod(IterableWrapper):
def __getattr__(self, name):
# Set access privileges:
if name not in ['parent', 'names', 'start_pos', 'end_pos', 'get_code']:
raise AttributeError('Strange accesson %s: %s.' % (self, name))
if name not in ['parent', 'names', 'start_pos', 'end_pos', 'get_code',
'get_definition']:
raise AttributeError('Strange access on %s: %s.' % (self, name))
return getattr(self.name, name)
def get_parent_until(self):