mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
commas don't need to be aligned (PY-4034)
This commit is contained in:
@@ -230,6 +230,9 @@ public class PyBlock implements ASTBlock {
|
||||
PyArgumentList argList = (PyArgumentList) _node.getPsi();
|
||||
return argList != null && argList.getArguments().length > 1;
|
||||
}
|
||||
if (child.getElementType() == PyTokenTypes.COMMA) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -271,6 +271,20 @@ public class PyIndentTest extends PyLightFixtureTestCase {
|
||||
"");
|
||||
}
|
||||
|
||||
public void testNestedLists() { // PY-4034
|
||||
doTest("mat = [\n" +
|
||||
" [1, 2, 3, 4, 4.5],\n" +
|
||||
" [5, 6, 7, 8],\n" +
|
||||
" [9, 10, 11, 12],<caret>\n" +
|
||||
"]",
|
||||
"mat = [\n" +
|
||||
" [1, 2, 3, 4, 4.5],\n" +
|
||||
" [5, 6, 7, 8],\n" +
|
||||
" [9, 10, 11, 12],\n" +
|
||||
" <caret>\n" +
|
||||
"]");
|
||||
}
|
||||
|
||||
/*
|
||||
TODO: formatter core problem?
|
||||
public void testAlignListBeforeEquals() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user