Describe the bug
I noticed what appears to be inconsistent formatting when comparing black's output (v23.10.1) to ruff's new formatter (v0.1.3), as I reported to ruff and can demonstrate here:
x = (
very_long_function_name_with_many_arguments(100, 200, 300, 400, 500, 600, 700, 800, 900, 1000).f()
# Comment
.g()
)
y = (
very_long_function_name_with_many_arguments(100, 200, 300, 400, 500, 600, 700, 800, 900, 1000).f()
# Comment
.g()
.h()
)
To Reproduce
Black doesn't move .f() to a new line in the first assignment (x = ...) but does move .f() to a new line in the second assignment (y = ...), as shown here:
x = (
very_long_function_name_with_many_arguments(
100, 200, 300, 400, 500, 600, 700, 800, 900, 1000
).f()
# Comment
.g()
)
y = (
very_long_function_name_with_many_arguments(
100, 200, 300, 400, 500, 600, 700, 800, 900, 1000
)
.f()
# Comment
.g()
.h()
)
Expected behavior
I did not expect that adding/removing the line .h() would affect how .f() is formatted.
Environment
Describe the bug
I noticed what appears to be inconsistent formatting when comparing black's output (v23.10.1) to ruff's new formatter (v0.1.3), as I reported to ruff and can demonstrate here:
To Reproduce
Black doesn't move
.f()to a new line in the first assignment (x = ...) but does move.f()to a new line in the second assignment (y = ...), as shown here:Expected behavior
I did not expect that adding/removing the line
.h()would affect how.f()is formatted.Environment