From 2c1c299e018c14d4cedf5a9f96cabba4b43dbbe5 Mon Sep 17 00:00:00 2001 From: Ekaterina Tuzova Date: Wed, 9 Jan 2013 13:22:20 +0400 Subject: [PATCH] fixed PY-4706 for Python 2.7 --- .../intentions/PyStringConcatenationToFormatIntention.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/src/com/jetbrains/python/codeInsight/intentions/PyStringConcatenationToFormatIntention.java b/python/src/com/jetbrains/python/codeInsight/intentions/PyStringConcatenationToFormatIntention.java index e6e2e268067f..fe8b9d740f83 100644 --- a/python/src/com/jetbrains/python/codeInsight/intentions/PyStringConcatenationToFormatIntention.java +++ b/python/src/com/jetbrains/python/codeInsight/intentions/PyStringConcatenationToFormatIntention.java @@ -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(")"); }