Merge branch 'master' into project

This commit is contained in:
Dave Halter committed 2020-02-03 09:26:43 +01:00
commit 3101e43aa6
18 files changed
+182 -14

No files matched your search

+10
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):
"""