mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
if there happens to be a line break inside a qualified reference, make sure we add an indent (PY-6359)
This commit is contained in:
@@ -240,6 +240,11 @@ public class PyBlock implements ASTBlock {
|
||||
childIndent = Indent.getNormalIndent();
|
||||
}
|
||||
}
|
||||
else if (parentType == PyElementTypes.REFERENCE_EXPRESSION) {
|
||||
if (child != _node.getFirstChildNode()) {
|
||||
childIndent = Indent.getNormalIndent();
|
||||
}
|
||||
}
|
||||
|
||||
if (isAfterStatementList(child) && !hasLineBreaksBefore(child, 2) && child.getElementType() != PyTokenTypes.END_OF_LINE_COMMENT) {
|
||||
// maybe enter was pressed and cut us from a previous (nested) statement list
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
sitesettings = call(settings_manager
|
||||
.get_whitelabel_settings_by_site_id(myuser.site_id))
|
||||
@@ -0,0 +1,2 @@
|
||||
sitesettings = call(settings_manager
|
||||
.get_whitelabel_settings_by_site_id(myuser.site_id))
|
||||
@@ -354,6 +354,10 @@ public class PyFormatterTest extends PyTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testWrapOnDot() { // PY-6359
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user