PY-73911: fix "the inserted app is double-quoted" issue

GitOrigin-RevId: e22cadbea69abbfaf312b67bce3a82b9190912b7
This commit is contained in:
Vladimir Lezhnev
2024-08-12 12:33:11 +00:00
committed by intellij-monorepo-bot
parent d969c2efbc
commit 3bcabcf4a0
2 changed files with 24 additions and 4 deletions
@@ -33,11 +33,18 @@ public abstract class PyElementGenerator extends PyAstElementGenerator {
* @param destination where the literal is destined to; used to determine the encoding.
* @param unescaped the string
* @param preferUTF8 try to use UTF8 (would use ascii if false)
* @param preferDoubleQuotes try to use double/single quotes
* @return a newly created literal
*/
protected abstract PyStringLiteralExpression createStringLiteralFromString(@Nullable PsiFile destination,
@NotNull String unescaped,
boolean preferUTF8, boolean preferDoubleQuotes);
public abstract PyStringLiteralExpression createStringLiteralFromString(@Nullable PsiFile destination, String unescaped,
boolean preferUTF8);
public abstract PyStringLiteralExpression createStringLiteralFromString(@NotNull String unescaped, boolean preferDoubleQuotes);
public abstract PyStringLiteralExpression createStringLiteralFromString(@NotNull String unescaped);
public abstract PyStringLiteralExpression createStringLiteral(@NotNull StringLiteralExpression oldElement, @NotNull String unescaped);
@@ -50,7 +57,7 @@ public abstract class PyElementGenerator extends PyAstElementGenerator {
@NotNull
public abstract PyExpression createExpressionFromText(@NotNull LanguageLevel languageLevel, @NotNull String text) throws IncorrectOperationException;
@NotNull
public abstract PyPattern createPatternFromText(@NotNull LanguageLevel languageLevel, @NotNull String text) throws IncorrectOperationException;