From cce425cb6d0d17fda2db380f4041ffe5be32ab59 Mon Sep 17 00:00:00 2001 From: David Halter Date: Thu, 22 Aug 2013 12:35:08 +0430 Subject: [PATCH] move BaseDefinition.path to _path --- jedi/api_classes.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/jedi/api_classes.py b/jedi/api_classes.py index 86215327..e50fa6e1 100644 --- a/jedi/api_classes.py +++ b/jedi/api_classes.py @@ -148,8 +148,7 @@ class BaseDefinition(object): stripped = stripped.parent return type(stripped).__name__.lower() - @property - def path(self): + def _path(self): """The module path.""" path = [] @@ -285,7 +284,7 @@ class BaseDefinition(object): (for example) ``'posixpath.join'``. """ - path = [unicode(p) for p in self.path] + path = [unicode(p) for p in self._path()] # TODO add further checks, the mapping should only occur on stdlib. if not path: return None # for keywords the path is empty @@ -395,7 +394,7 @@ class Completion(BaseDefinition): if t == 'statement' or t == 'import': desc = self._definition.get_code(False) else: - desc = '.'.join(unicode(p) for p in self.path) + desc = '.'.join(unicode(p) for p in self._path()) line = '' if self.in_builtin_module else '@%s' % self.line return '%s: %s%s' % (t, desc, line)