fixed PY-4706 for Python 2.7

This commit is contained in:
Ekaterina Tuzova
2013-01-09 13:22:20 +04:00
parent bce962d70f
commit 2c1c299e01
@@ -67,7 +67,7 @@ public class PyStringConcatenationToFormatIntention extends BaseIntentionAction
return false;
}
}
if (LanguageLevel.forElement(element).isPy3K())
if (LanguageLevel.forElement(element).isAtLeast(LanguageLevel.PYTHON27))
setText(PyBundle.message("INTN.replace.plus.with.str.format"));
else
setText(PyBundle.message("INTN.replace.plus.with.format.operator"));
@@ -135,7 +135,7 @@ public class PyStringConcatenationToFormatIntention extends BaseIntentionAction
PyElementGenerator elementGenerator = PyElementGenerator.getInstance(project);
if (!parameters.isEmpty()) {
if (languageLevel.isPy3K()) {
if (LanguageLevel.forElement(element).isAtLeast(LanguageLevel.PYTHON27)) {
stringLiteral.append(".format(").append(StringUtil.join(parameters, ",")).append(")");
}