void (PyNamedParameter parameter, boolean first, boolean last) { if (parameterNames.contains(parameter.getName())) { markError(parameter, PyPsiBundle.message("ANN.duplicate.param.name")); } parameterNames.add(parameter.getName()); if (parameter.isPositionalContainer()) { if (hadKeywordContainer) { markError(parameter, PyPsiBundle.message("ANN.starred.param.after.kwparam")); } if (hadSingleStar) { markError(parameter, PyPsiBundle.message("ANN.multiple.args")); } if (hadPositionalContainer) markError(parameter, PyPsiBundle.message("ANN.multiple.args")); hadPositionalContainer = true; } else if (parameter.isKeywordContainer()) { if (hadKeywordContainer) markError(parameter, PyPsiBundle.message("ANN.multiple.kwargs")); hadKeywordContainer = true; if (hadSingleStar && !hadParamsAfterSingleStar) { markError(parameter, PyPsiBundle.message("ANN.named.parameters.after.star")); } } else { if (hadSingleStar) { hadParamsAfterSingleStar = true; } if (hadPositionalContainer && languageLevel.isPython2()) { markError(parameter, PyPsiBundle.message("ANN.regular.param.after.vararg")); } else if (hadKeywordContainer) { markError(parameter, PyPsiBundle.message("ANN.regular.param.after.keyword")); } if (parameter.hasDefaultValue()) { hadDefaultValue = true; } else { if (hadDefaultValue && !hadSingleStar && (languageLevel.isPython2() || !hadPositionalContainer) && inTuple == 0) { markError(parameter, PyPsiBundle.message("ANN.non.default.param.after.default")); } } } }