google / google/yapf

Bad formating

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

Description

How I can from this:
```py
async def get_user(
credentials: HTTPAuthorizationCredentials = Security(security)
):
token = credentials.credentials

with Session(engine) as session:
user = session.exec(select(User).where(User.token == token)
).one_or_none()

. . .
```
Get something like this:
```py
async def get_user(
credentials: HTTPAuthorizationCredentials = Security(security)
):
token = credentials.credentials

with Session(engine) as session:
user = session.exec(
select(User).where(User.token == token)
).one_or_none()

. . .
```
Or
```py
async def get_user(
credentials: HTTPAuthorizationCredentials = Security(security)
):
token = credentials.credentials

with Session(engine) as session:
user = session.exec(select(User).where(User.token == token)).one_or_none()

. . .
```
My config:
```
[style]
based_on_style = pep8
indent_width = 4

force_multiline_dict = true
allow_split_before_dict_value = false

spaces_around_default_or_named_assign = true
allow_split_before_default_or_named_assigns = true
dedent_closing_brackets = true
```

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.