1
0
forked from VimPlug/jedi

Make names_dict available in modules.

This commit is contained in:
Dave Halter
2014-11-02 14:22:00 +01:00
parent afca0ef047
commit 0c3cba166e
3 changed files with 12 additions and 8 deletions

View File

@@ -76,6 +76,7 @@ class NameFinder(object):
names = []
self.maybe_descriptor = isinstance(self.scope, er.Class)
for name_list_scope, name_list in scope_names_generator:
print(name_list_scope, hasattr(name_list_scope, 'names_dict'))
break_scopes = []
if not isinstance(name_list_scope, compiled.CompiledObject):
# Here is the position stuff happening (sorting of variables).

View File

@@ -436,7 +436,7 @@ class Class(use_metaclass(CachedMetaClass, Wrapper)):
def __getattr__(self, name):
if name not in ['start_pos', 'end_pos', 'parent', 'asserts', 'raw_doc',
'doc', 'get_imports', 'get_parent_until', 'get_code',
'subscopes']:
'subscopes', 'names_dict']:
raise AttributeError("Don't touch this: %s of %s !" % (name, self))
return getattr(self.base, name)