From 21d6cb7512d5b0ed6d7adbc3ebd5fffe7058fc6d Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Wed, 22 Aug 2012 16:47:32 +0200 Subject: [PATCH] don't wrap before comma --- python/src/com/jetbrains/python/formatter/PyBlock.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/src/com/jetbrains/python/formatter/PyBlock.java b/python/src/com/jetbrains/python/formatter/PyBlock.java index 75dd6bf3a95f..ba52b5aa8e00 100644 --- a/python/src/com/jetbrains/python/formatter/PyBlock.java +++ b/python/src/com/jetbrains/python/formatter/PyBlock.java @@ -126,7 +126,7 @@ public class PyBlock implements ASTBlock { if (ourListElementTypes.contains(parentType)) { // wrapping in non-parenthesized tuple expression is not allowed (PY-1792) if ((parentType != PyElementTypes.TUPLE_EXPRESSION || grandparentType == PyElementTypes.PARENTHESIZED_EXPRESSION) && - !ourBrackets.contains(childType)) { + !ourBrackets.contains(childType) && childType != PyTokenTypes.COMMA) { wrap = Wrap.createWrap(WrapType.NORMAL, true); } if (needListAlignment(child) && !isEmptyList(_node.getPsi())) {