forked from VimPlug/jedi
Add a names_dict to scopes. This is good for the future parser and now useful to process self.foo and other stuff.
This commit is contained in:
@@ -164,6 +164,7 @@ class Instance(use_metaclass(CachedMetaClass, Executed)):
|
||||
# because to follow them and their self variables is too
|
||||
# complicated.
|
||||
sub = self._get_method_execution(sub)
|
||||
print(sub.get_names_dict())
|
||||
for n in sub.get_defined_names():
|
||||
# Only names with the selfname are being added.
|
||||
# It is also important, that they have a len() of 2,
|
||||
@@ -579,6 +580,10 @@ class FunctionExecution(Executed):
|
||||
break
|
||||
return types
|
||||
|
||||
@underscore_memoization
|
||||
def get_names_dict(self):
|
||||
return self.
|
||||
|
||||
@memoize_default(default=())
|
||||
def _get_params(self):
|
||||
"""
|
||||
@@ -631,7 +636,7 @@ class FunctionExecution(Executed):
|
||||
@common.safe_property
|
||||
@memoize_default([])
|
||||
def returns(self):
|
||||
return self._copy_list('returns')
|
||||
return self._copy_list(self)
|
||||
|
||||
@common.safe_property
|
||||
@memoize_default([])
|
||||
|
||||
Reference in New Issue
Block a user