commas don't need to be aligned (PY-4034)

This commit is contained in:
Dmitry Jemerov
2011-07-05 16:17:33 +02:00
parent 05ec420643
commit 6a51d99f8b
2 changed files with 17 additions and 0 deletions
@@ -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 {