Skip to content

Commit

Permalink
refactor: Operator wrapping on end of line
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek and TeamModerne committed Sep 21, 2024
1 parent 0b51fc0 commit e1cca5d
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions src/main/java/org/openrewrite/python/tree/Py.java
Original file line number Diff line number Diff line change
Expand Up @@ -1111,8 +1111,8 @@ public JLeftPadded<Block> getElseBlock() {
}

public TrailingElseWrapper withElseBlock(JLeftPadded<Block> elseBlock) {
return t.elseBlock == elseBlock
? t :
return t.elseBlock == elseBlock ?
t :
new TrailingElseWrapper(t.padding, t.id, t.prefix, t.markers, t.statement, elseBlock);
}
}
Expand Down Expand Up @@ -1399,9 +1399,9 @@ public List<JRightPadded<J.Identifier>> getNames() {
}

public VariableScope withNames(List<JRightPadded<J.Identifier>> names) {
return names == t.names
? t
: new VariableScope(t.id, t.prefix, t.markers, t.kind, names);
return names == t.names ?
t :
new VariableScope(t.id, t.prefix, t.markers, t.kind, names);
}
}
}
Expand Down Expand Up @@ -1472,9 +1472,9 @@ public List<JRightPadded<Expression>> getTargets() {
}

public Del withTargets(List<JRightPadded<Expression>> expressions) {
return expressions == t.targets
? t
: new Del(t.id, t.prefix, t.markers, expressions);
return expressions == t.targets ?
t :
new Del(t.id, t.prefix, t.markers, expressions);
}
}
}
Expand Down Expand Up @@ -1626,9 +1626,9 @@ public JLeftPadded<Expression> getValue() {
}

public NamedArgument withValue(JLeftPadded<Expression> value) {
return value == t.value
? t
: new NamedArgument(t.id, t.prefix, t.markers, t.name, value, t.type);
return value == t.value ?
t :
new NamedArgument(t.id, t.prefix, t.markers, t.name, value, t.type);
}
}
}
Expand Down Expand Up @@ -1746,9 +1746,9 @@ public JLeftPadded<Expression> getFrom() {
}

public ErrorFrom withFrom(JLeftPadded<Expression> from) {
return from == t.from
? t
: new ErrorFrom(t.id, t.prefix, t.markers, t.error, from, t.type);
return from == t.from ?
t :
new ErrorFrom(t.id, t.prefix, t.markers, t.error, from, t.type);
}
}

Expand Down Expand Up @@ -1834,9 +1834,9 @@ public static class Padding {
}

public MatchCase withGuard(JLeftPadded<Expression> guard) {
return guard == t.guard
? t
: new MatchCase(t.id, t.prefix, t.markers, t.pattern, guard, null);
return guard == t.guard ?
t :
new MatchCase(t.id, t.prefix, t.markers, t.pattern, guard, null);
}
}

Expand Down Expand Up @@ -1937,9 +1937,9 @@ public JContainer<Expression> getChildren() {
}

public Pattern withChildren(JContainer<Expression> children) {
return children == t.children
? t
: new Pattern(t.id, t.prefix, t.markers, t.kind, children, t.type);
return children == t.children ?
t :
new Pattern(t.id, t.prefix, t.markers, t.kind, children, t.type);
}
}

Expand Down

0 comments on commit e1cca5d

Please sign in to comment.