mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fixed extra space between '@' and decorator name
'@' is now a binary operator (see PY-15390), so the formatter surrounds it with spaces. This change broke many formatter-related tests. We need an extra rule for not adding spaces if '@' is used inside a decorator statement.
This commit is contained in:
@@ -108,6 +108,7 @@ public class PythonFormattingModelBuilder implements FormattingModelBuilderEx, C
|
||||
.between(FROM_KEYWORD, DOT).spaces(1)
|
||||
.between(DOT, IMPORT_KEYWORD).spaces(1)
|
||||
.around(DOT).spaces(0)
|
||||
.aroundInside(AT, DECORATOR_CALL).none()
|
||||
.before(SEMICOLON).spaceIf(commonSettings.SPACE_BEFORE_SEMICOLON)
|
||||
.withinPairInside(LPAR, RPAR, ARGUMENT_LIST).spaceIf(commonSettings.SPACE_WITHIN_METHOD_CALL_PARENTHESES)
|
||||
.withinPairInside(LPAR, RPAR, PARAMETER_LIST).spaceIf(commonSettings.SPACE_WITHIN_METHOD_PARENTHESES)
|
||||
|
||||
Reference in New Issue
Block a user