1
0
forked from VimPlug/jedi

replace get_defined_names with scope_names_generator in a lot of places (the cleanup still needs to be done, though).

This commit is contained in:
Dave Halter
2014-07-02 16:12:49 +02:00
parent 749d0121fc
commit 13ada3154b
5 changed files with 39 additions and 15 deletions

View File

@@ -18,12 +18,16 @@ class InterpreterNamespace(pr.Module):
self.parser_module = parser_module
self._evaluator = evaluator
@underscore_memoization
def get_defined_names(self):
for name in self.parser_module.get_defined_names():
yield name
for key, value in self.namespace.items():
yield LazyName(self._evaluator, key, value)
def scope_names_generator(self, position=None):
yield self, list(self.get_defined_names())
def __getattr__(self, name):
return getattr(self.parser_module, name)