mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed PY-4706 for Python 2.7
This commit is contained in:
+2
-2
@@ -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(")");
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user