mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed PY-12024 "Replace mutable default argument" quickfix outputs non-standard formatting
This commit is contained in:
@@ -74,7 +74,7 @@ public class PyDefaultArgumentQuickFix implements LocalQuickFix {
|
||||
}
|
||||
str.append("):\n\tpass");
|
||||
PyIfStatement ifStatement = elementGenerator.createFromText(LanguageLevel.forElement(function), PyIfStatement.class,
|
||||
"if not " + defName + ": " + defName + " = " + defaultValue.getText());
|
||||
"if not " + defName + ":\n\t" + defName + " = " + defaultValue.getText());
|
||||
|
||||
PyStatement firstStatement = list.getStatements()[0];
|
||||
PyStringLiteralExpression docString = function.getDocStringExpression();
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
def foo(args=None):
|
||||
if not args: args = []
|
||||
if not args:
|
||||
args = []
|
||||
pass
|
||||
Reference in New Issue
Block a user