google / google/yapf

Bad formatting for call of a function

Open
#743 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
14k
Forks
904
PR merge metrics
No merged PRs in 30d

Description

Hi,
I currently run into a problem where few function calls are on a new line.

This:
```
assert_exception(lambda: self.api.AddItem(term_id=self.terminal['id'], check_id=self.check_id, item_id=self.item['id'],
modifiers=[modifier]), "ModifierReqsNotMetException")
```
is reformatted into this:
```
assert_exception(
lambda: self.api.
AddItem(term_id=self.terminal['id'], check_id=self.check_id, item_id=self.item['id'], modifiers=[modifier]),
"ModifierReqsNotMetException"
)
```
I really don't like `lambda: self.api.` and on the new line `AddItem(...) `
Can be please something done about it? Or am I doing something wrong? :)
Thank you

Using:
based_on_style:PEP8,
indent_dictionary_value:True,
allow_split_before_dict_value:False,
dedent_closing_brackets:True,
split_before_named_assigns:False,
allow_multiline_lamdbas:True,
column_limit=120

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.