mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
allow wrapping in imports (PY-9163)
This commit is contained in:
@@ -146,7 +146,8 @@ public class PyBlock implements ASTBlock {
|
||||
childIndent = Indent.getNormalIndent();
|
||||
}
|
||||
}
|
||||
else if (childType == PyElementTypes.IMPORT_ELEMENT && hasLineBreaksBefore(child, 1)) {
|
||||
else if (childType == PyElementTypes.IMPORT_ELEMENT) {
|
||||
wrap = Wrap.createWrap(WrapType.NORMAL, true);
|
||||
childIndent = Indent.getNormalIndent();
|
||||
}
|
||||
if (ourListElementTypes.contains(parentType)) {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
from common.resources.health import URLHealthCheck, JSONURLHealthCheck, HealthHandler, HealthResult
|
||||
@@ -0,0 +1,2 @@
|
||||
from common.resources.health import URLHealthCheck, JSONURLHealthCheck, \
|
||||
HealthHandler, HealthResult
|
||||
@@ -345,6 +345,11 @@ public class PyFormatterTest extends PyTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testWrapImports() { // PY-9163
|
||||
settings().RIGHT_MARGIN = 80;
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user