Different formatting depending number of argument to a function
- Dominant language
- Python
- Stars
- 14k
- Forks
- 904
- PR merge metrics
- No merged PRs in 30d
Description
I noticed, that with version 0.6.2, when a the first parameter for a function (here: `other_function`) does not take arguments, yapf prints what I would expect:
```
$ echo 'something = a_function(other_function(), some_more_long_arguments, and_more_long_args)' | yapf
something = a_function(other_function(), some_more_long_arguments,
and_more_long_args)
```
However, if `other_function` has an argument, something strange happens:
```
$ echo 'something = a_function(other_function(a), some_more_long_arguments, and_more_long_args)' | yapf
something = a_function(
other_function(a), some_more_long_arguments, and_more_long_args)
```
Is it a bug, or a feature?
Some code formatted in October (that is: some earlier version of yapf) was formatted as the first fragment, even though it used `other_function(a)` like construct.
This seems related to #216
Is it possible to control how this works?
Contributor guide
Assessment
This issue has not been assessed yet.