void (PyElement element, List<? super LookupElement> ret, @NotNull final TypeEvalContext context, final boolean addEquals) { PyCallExpression callExpr = PsiTreeUtil.getParentOfType(element, PyCallExpression.class); if (callExpr != null) { PyExpression callee = callExpr.getCallee(); if (callee instanceof PyReferenceExpression && element.getParent() == callExpr.getArgumentList()) { PyType calleeType = context.getType(callee); if (calleeType == null) { final PyTypedElement implicit = as(getElementByChain((PyReferenceExpression)callee, context), PyTypedElement.class); if (implicit != null) { calleeType = context.getType(implicit); } } Set<String> namedArgsAlready = StreamEx.of(callExpr.getArgumentList().getArguments()) .select(PyKeywordArgument.class) .map(PyKeywordArgument::getKeyword) .toSet(); final List<LookupElement> extra = PyTypeUtil.toStream(calleeType) .select(PyCallableType.class) .flatMap(type -> collectParameterNamesFromType(type, callExpr, context).stream()) .filter(it -> !namedArgsAlready.contains(it)) .map(name -> PyUtil.createNamedParameterLookup(name, element.getContainingFile(), addEquals)) .toList(); ret.addAll(extra); } } }