From a course module we're working on. Input:
tween.tween_method(
func(t: float) -> void:
if move_and_collide(start.lerp(destination, t) - global_position):
tween.kill()
_transition_to_state(State.NORMAL),
0.0, 1.0, duration
).set_trans(Hook.PULL_TRANS).set_ease(Hook.PULL_EASE)
Current output:
tween \
.tween_method(
func(t: float) -> void:
if move_and_collide(start.lerp(destination, t) - global_position):
tween.kill()
_transition_to_state(State.NORMAL),
0.0,
1.0,
duration,
) \
.set_trans(Hook.PULL_TRANS) \
.set_ease(Hook.PULL_EASE)
In this case, it's probably more readable as a result to keep the tail end of the chain after the long arguments on a single line if possible. And for the first line, we definitely want not to wrap.
The parser is seeing this as a chain too long to fit on a single line, and it tries to consistently add backslashes for vertical chains of method calls and align the property accesses/method calls vertically.
Desired output:
tween.tween_method(
func(t: float) -> void:
if move_and_collide(start.lerp(destination, t) - global_position):
tween.kill()
_transition_to_state(State.NORMAL),
0.0,
1.0,
duration,
).set_trans(Hook.PULL_TRANS).set_ease(Hook.PULL_EASE)
From a course module we're working on. Input:
Current output:
In this case, it's probably more readable as a result to keep the tail end of the chain after the long arguments on a single line if possible. And for the first line, we definitely want not to wrap.
The parser is seeing this as a chain too long to fit on a single line, and it tries to consistently add backslashes for vertical chains of method calls and align the property accesses/method calls vertically.
Desired output: