1
0
forked from VimPlug/jedi

fix a few more minor issues

This commit is contained in:
Dave Halter
2014-01-11 16:14:58 +01:00
parent c6a14a348e
commit d430ef53a7
4 changed files with 4 additions and 8 deletions

View File

@@ -362,17 +362,13 @@ class SubModule(Scope, Module):
string = '' # no path -> empty name
else:
sep = (re.escape(os.path.sep),) * 2
r = re.search(r'([^%s]*?)(%s__init__)?(\.py|\.so)?$' % sep,
self.path)
r = re.search(r'([^%s]*?)(%s__init__)?(\.py|\.so)?$' % sep, self.path)
# remove PEP 3149 names
string = re.sub('\.[a-z]+-\d{2}[mud]{0,3}$', '', r.group(1))
# positions are not real therefore choose (0, 0)
names = [(string, (0, 0))]
return Name(self, names, (0, 0), (0, 0), self.use_as_parent)
def is_builtin(self):
return not (self.path is None or self.path.endswith('.py'))
@property
def has_explicit_absolute_import(self):
"""