1
0
forked from VimPlug/jedi

tests working all again, with weakref parents

This commit is contained in:
David Halter
2012-08-13 01:23:29 +02:00
parent 673cb30ee8
commit 8e20c754b1
4 changed files with 62 additions and 31 deletions

View File

@@ -71,6 +71,14 @@ class Definition(object):
""" The definition of a function """
self.definition = definition
par = self.definition
while True:
if par.parent() is not None:
par = par.parent()
else:
break
self.module_path = str(par.path)
def get_name(self):
try:
# is a func / class
@@ -91,17 +99,6 @@ class Definition(object):
except ValueError:
return path
@property
def module_path(self):
par = self.definition
while True:
if par.parent() is not None:
par = par.parent()
else:
break
return str(par.path)
def in_builtin_module(self):
return not self.module_path.endswith('.py')