google / google/yapf

[usage question] Can I configure yapf to indent after trailing comma only when in a list, indent the items and put the list closing/opening brackets on there own lines (allman style)?

Open
#1,034 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
14k
Forks
904
PR merge metrics
No merged PRs in 30d

Description

Would like it to enforce that function parameters stay on a single line (perhaps up to a line threshold), but that lists are displayed allmancase style with each element on its own line

Desired output format:

```py
page.add(
flet.Container(expand=True, bgcolor="#252526", border_radius=5.5, margin=-7, padding=3, content=flet.Stack(controls=
[
flet.Column(controls=
[
windowDragArea,
result,
flet.Stack(ref=dope,animate_scale=80,controls=
[
flet.Image(src="obi-wan pfp.jpg", width=100),
flet.Image(src="lisa/icons/blobs/blobSharp_Inverse.png", width=100, color="#252526",),
flet.Container(width=100, height=100, on_hover=scale),
]),
flexGrid,
])
])),
)
```
Any thoughts appreciated 💝

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.