`split_before_first_argument` breaks `split_all_top_level_comma_separated_values` but not `split_all_comma_separated_values`
- Dominant language
- Python
- Stars
- 14k
- Forks
- 904
- PR merge metrics
- No merged PRs in 30d
Description
Consider the file `test.py`:
def foo():
long_function(long_argument_name_1, long_argument_name_2, long_argument_name_3)
By themselves, the following styles do the same thing, as expected:
$ yapf --style '{split_all_comma_separated_values: True}' test.py
def foo():
long_function(long_argument_name_1,
long_argument_name_2,
long_argument_name_3)
$ yapf --style '{split_all_top_level_comma_separated_values: True}' test.py
def foo():
long_function(long_argument_name_1,
long_argument_name_2,
long_argument_name_3)
But adding the style `split_before_first_argument: True` breaks the `top_level` version only. I would expect the first output in both cases:
$ yapf --style '{split_all_comma_separated_values: True, split_before_first_argument: True}' test.py
def foo():
long_function(
long_argument_name_1,
long_argument_name_2,
long_argument_name_3)
$ yapf --style '{split_all_top_level_comma_separated_values: True, split_before_first_argument: True}' test.py
def foo():
long_function(
long_argument_name_1, long_argument_name_2, long_argument_name_3)
Contributor guide
Assessment
This issue has not been assessed yet.