forked from VimPlug/jedi
Avoid function executions if they are not necessary
This also means that annotations are prefered to docstring types
This commit is contained in:
@@ -33,9 +33,8 @@ class ExecutedParam(object):
|
||||
def infer(self, use_hints=True):
|
||||
if use_hints:
|
||||
doc_params = docstrings.infer_param(self._execution_context, self._param_node)
|
||||
ann = self.infer_annotations().execute_annotation()
|
||||
if ann or doc_params:
|
||||
return ann | doc_params
|
||||
if doc_params:
|
||||
return doc_params
|
||||
|
||||
return self._lazy_value.infer()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user