1
0
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:
Dave Halter
2019-08-24 11:59:13 +02:00
parent e0f26dd7a1
commit 88cf198552
5 changed files with 15 additions and 11 deletions
+3 -1
View File
@@ -107,8 +107,10 @@ def _split_comment_param_declaration(decl_text):
@inference_state_method_cache()
def infer_param(execution_context, param):
def infer_param(execution_context, param, ignore_stars=False):
values = _infer_param(execution_context, param)
if ignore_stars:
return values
inference_state = execution_context.inference_state
if param.star_count == 1:
tuple_ = builtin_from_name(inference_state, 'tuple')