forked from VimPlug/jedi
Finally make it possible to use auto_import_modules for packages
This means that you can now write 'from gi.repository import Gtk' and Gtk completions work. It also means that other libraries could be used like that for speed or other reasons. Fixes #531
This commit is contained in:
@@ -150,7 +150,7 @@ def load_module(evaluator, path=None, name=None, sys_path=None):
|
||||
__import__(dotted_path)
|
||||
except ImportError:
|
||||
# If a module is "corrupt" or not really a Python module or whatever.
|
||||
debug.warning('Module %s not importable in path %s.', dotted_path, path)
|
||||
print_to_stderr('Module %s not importable in path %s.' % (dotted_path, path))
|
||||
return None
|
||||
except Exception:
|
||||
# Since __import__ pretty much makes code execution possible, just
|
||||
@@ -262,6 +262,9 @@ class DirectObjectAccess(object):
|
||||
def py__bases__(self):
|
||||
return [self._create_access_path(base) for base in self._obj.__bases__]
|
||||
|
||||
def py__path__(self):
|
||||
return self._obj.__path__
|
||||
|
||||
@_force_unicode_decorator
|
||||
def get_repr(self):
|
||||
builtins = 'builtins', '__builtin__'
|
||||
|
||||
Reference in New Issue
Block a user