1
0
forked from VimPlug/jedi

More issues from the list of types to set of types conversion.

This commit is contained in:
Dave Halter
2015-10-30 10:32:17 +01:00
parent 05798734bf
commit ee51b0a62f
3 changed files with 5 additions and 5 deletions

View File

@@ -322,7 +322,7 @@ class BaseDefinition(object):
elif self._definition.isinstance(tree.Import):
return imports.ImportWrapper(self._evaluator, self._name).follow()
else:
return [self._definition]
return set([self._definition])
@property
@memoize_default()
@@ -331,7 +331,7 @@ class BaseDefinition(object):
Raises an ``AttributeError``if the definition is not callable.
Otherwise returns a list of `Definition` that represents the params.
"""
followed = self._follow_statements_imports()
followed = list(self._follow_statements_imports())
if not followed or not hasattr(followed[0], 'py__call__'):
raise AttributeError()
followed = followed[0] # only check the first one.
@@ -449,7 +449,7 @@ class Completion(BaseDefinition):
followed = self._follow_statements_imports()
if followed:
# TODO: Use all of the followed objects as input to Documentation.
definition = followed[0]
definition = list(followed)[0]
if raw:
return _Help(definition).raw()