1
0
forked from VimPlug/jedi

evaluate.get_scopes_for_name -> evaluate.find_name

This commit is contained in:
David Halter
2013-02-05 18:26:38 +01:00
parent 650b96dbda
commit 2b64171dd7
3 changed files with 10 additions and 13 deletions

View File

@@ -248,8 +248,7 @@ class Class(use_metaclass(cache.CachedMetaClass, pr.Base)):
supers.append(cls)
if not supers and self.base.parent != builtin.Builtin.scope:
# add `object` to classes
supers += evaluate.get_scopes_for_name(builtin.Builtin.scope,
'object')
supers += evaluate.find_name(builtin.Builtin.scope, 'object')
return supers
@cache.memoize_default(default=[])
@@ -813,8 +812,7 @@ class Array(use_metaclass(cache.CachedMetaClass, pr.Base)):
It returns e.g. for a list: append, pop, ...
"""
# `array.type` is a string with the type, e.g. 'list'.
scope = evaluate.get_scopes_for_name(builtin.Builtin.scope,
self._array.type)[0]
scope = evaluate.find_name(builtin.Builtin.scope, self._array.type)[0]
scope = Instance(scope)
names = scope.get_defined_names()
return [ArrayElement(n) for n in names]