forked from VimPlug/jedi
Passing Function tests now.
This commit is contained in:
@@ -145,7 +145,7 @@ class NameFinder(object):
|
||||
evaluation, so remove them already here!
|
||||
"""
|
||||
for n in names:
|
||||
definition = n.parent.parent
|
||||
definition = n.parent
|
||||
if isinstance(definition, (pr.Function, pr.Class, pr.Module)):
|
||||
yield er.wrap(self._evaluator, definition).name
|
||||
else:
|
||||
|
||||
@@ -193,14 +193,13 @@ class Array(use_metaclass(CachedMetaClass, IterableWrapper)):
|
||||
|
||||
def scope_names_generator(self, position=None):
|
||||
"""
|
||||
This method generates all `ArrayMethod` for one pr.Array.
|
||||
It returns e.g. for a list: append, pop, ...
|
||||
"""
|
||||
# `array.type` is a string with the type, e.g. 'list'.
|
||||
scope = self._evaluator.find_types(compiled.builtin, self._array.type)[0]
|
||||
scope = self._evaluator.execute(scope)[0] # builtins only have one class
|
||||
for _, names in scope.scope_names_generator():
|
||||
yield self, [ArrayMethod(n) for n in names]
|
||||
yield self, [helpers.FakeName(n.get_code(), self) for n in names]
|
||||
|
||||
@common.safe_property
|
||||
def parent(self):
|
||||
|
||||
Reference in New Issue
Block a user