PyExpression (@NotNull PyDecoratable referenceTarget, @NotNull List<PyDecorator> decorators, @NotNull TypeEvalContext context) { StringBuilder result = new StringBuilder(); for (PyDecorator decorator : decorators) { if (context.maySwitchToAST(decorator)) { result.append(decorator.getText().substring(1)); } else { result .append(decorator.getName()) .append(decorator.hasArgumentList() ? "()" : ""); } result.append("("); } result.append(referenceTarget.getName()); StringUtil.repeatSymbol(result, ')', decorators.size()); return PyUtil.createExpressionFromFragment(result.toString(), referenceTarget.getContainingFile()); }