String (@NotNull List<? extends PyCallableParameter> parameters, boolean includeDefaultValue, @Nullable TypeEvalContext context) { final StringBuilder result = new StringBuilder(); result.append("("); walkDownParameters( parameters, new ParamHelper.ParamWalker() { @Override public void enterTupleParameter(PyTupleParameter param, boolean first, boolean last) { result.append("("); } @Override public void leaveTupleParameter(PyTupleParameter param, boolean first, boolean last) { result.append(")"); if (!last) result.append(", "); } @Override public void visitNamedParameter(PyNamedParameter param, boolean first, boolean last) { visitNonPsiParameter(PyCallableParameterImpl.psi(param), first, last); } @Override public void visitSlashParameter(@NotNull PySlashParameter param, boolean first, boolean last) { result.append(PySlashParameter.TEXT); if (!last) result.append(", "); } @Override public void visitSingleStarParameter(PySingleStarParameter param, boolean first, boolean last) { result.append(PySingleStarParameter.TEXT); if (!last) result.append(", "); } @Override public void visitNonPsiParameter(@NotNull PyCallableParameter parameter, boolean first, boolean last) { result.append(parameter.getPresentableText(includeDefaultValue, context)); if (!last) result.append(", "); } } ); result.append(")"); return result.toString(); }