mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Strip spaces before/after parenthesis inside generator expression
This commit is contained in:
@@ -113,6 +113,7 @@ public class PythonFormattingModelBuilder implements FormattingModelBuilderEx, C
|
||||
.withinPairInside(LPAR, RPAR, ARGUMENT_LIST).spaceIf(commonSettings.SPACE_WITHIN_METHOD_CALL_PARENTHESES)
|
||||
.withinPairInside(LPAR, RPAR, PARAMETER_LIST).spaceIf(commonSettings.SPACE_WITHIN_METHOD_PARENTHESES)
|
||||
.withinPairInside(LPAR, RPAR, FROM_IMPORT_STATEMENT).spaces(0)
|
||||
.withinPairInside(LPAR, RPAR, GENERATOR_EXPRESSION).spaces(0)
|
||||
.before(LBRACKET).spaceIf(pySettings.SPACE_BEFORE_LBRACKET)
|
||||
|
||||
.withinPair(LBRACE, RBRACE).spaceIf(pySettings.SPACE_WITHIN_BRACES)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
gen = ( for c in 'abrakadabra' )
|
||||
@@ -0,0 +1 @@
|
||||
gen = (for c in 'abrakadabra')
|
||||
@@ -404,6 +404,10 @@ public class PyFormatterTest extends PyTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testParenthesisAroundGeneratorExpression() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user