1
0
forked from VimPlug/jedi

Fix issues with the os module.

Using a try/finally assures that the recursion checkers work the right way.
This commit is contained in:
Dave Halter
2014-09-19 10:59:24 +02:00
parent b2342c76be
commit fc5f73861c
3 changed files with 65 additions and 44 deletions
+8
View File
@@ -686,6 +686,14 @@ class ModuleWrapper(use_metaclass(CachedMetaClass, pr.Module, Wrapper)):
imp = helpers.FakeImport(name, self, level=1)
name.parent = imp
names.append(name)
# TODO add something like this in the future, its cleaner than the
# import hacks.
# ``os.path`` is a hardcoded exception, because it's a
# ``sys.modules`` modification.
#if str(self.name) == 'os':
# names.append(helpers.FakeName('path', parent=self))
return names
def __getattr__(self, name):