1
0
forked from VimPlug/jedi

Merge branch 'master' into project

This commit is contained in:
Dave Halter
2020-02-03 09:26:43 +01:00
18 changed files with 182 additions and 14 deletions

View File

@@ -513,6 +513,16 @@ class BaseDefinition(object):
def execute(self):
return _values_to_definitions(self._name.infer().execute_with_values())
def get_type_hint(self):
"""
Returns type hints like ``Iterable[int]`` or ``Union[int, str]``.
This method might be quite slow, especially for functions. The problem
is finding executions for those functions to return something like
``Callable[[int, str], str]``.
"""
return self._name.infer().get_type_hint()
class Completion(BaseDefinition):
"""