1
0
forked from VimPlug/jedi

no str cast on None for module paths

This commit is contained in:
David Halter
2013-01-04 20:16:13 +01:00
parent 3f5e9d6bca
commit 9f9bbaae56

View File

@@ -57,7 +57,8 @@ class BaseDefinition(object):
self.is_keyword = isinstance(definition, keywords.Keyword)
# generate a path to the definition
self.module_path = unicode(definition.get_parent_until().path)
p = definition.get_parent_until().path
self.module_path = p if p is None else unicode(p)
@property
def type(self):
@@ -92,7 +93,8 @@ class BaseDefinition(object):
def in_builtin_module(self):
"""Whether this is a builtin module."""
return not self.module_path.endswith('.py')
return not (self.module_path is None or
self.module_path.endswith('.py'))
@property
def line_nr(self):