mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
since pep8.py complains about blank lines after decorators, add rule to remove them
This commit is contained in:
@@ -90,6 +90,9 @@ public class PythonFormattingModelBuilder implements FormattingModelBuilderEx, C
|
||||
|
||||
.before(ARGUMENT_LIST).spaceIf(commonSettings.SPACE_BEFORE_METHOD_CALL_PARENTHESES)
|
||||
|
||||
.around(DECORATOR_CALL).spacing(1, Integer.MAX_VALUE, 0, true, 0)
|
||||
.after(DECORATOR_LIST).spacing(1, Integer.MAX_VALUE, 0, true, 0)
|
||||
|
||||
.aroundInside(EQ, ASSIGNMENT_STATEMENT).spaceIf(commonSettings.SPACE_AROUND_ASSIGNMENT_OPERATORS)
|
||||
.aroundInside(EQ, NAMED_PARAMETER).spaceIf(pySettings.SPACE_AROUND_EQ_IN_NAMED_PARAMETER)
|
||||
.aroundInside(EQ, KEYWORD_ARGUMENT_EXPRESSION).spaceIf(pySettings.SPACE_AROUND_EQ_IN_KEYWORD_ARGUMENT)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
@foo
|
||||
|
||||
@bar
|
||||
|
||||
def baz(): pass
|
||||
@@ -0,0 +1,3 @@
|
||||
@foo
|
||||
@bar
|
||||
def baz(): pass
|
||||
@@ -179,6 +179,10 @@ public class PyFormatterTest extends PyTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testBlankLineAfterDecorator() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testPsiFormatting() { // IDEA-69724
|
||||
String initial =
|
||||
"def method_name(\n" +
|
||||
|
||||
Reference in New Issue
Block a user