google / google/yapf

Reformatted continuation lines have the same indent as the following line in context managers

Open
#445 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

I have some code

```
async with pool.acquire() as conn, conn.cursor(
cursor_factory=NamedTupleCursor, timeout=some_config.cursor_timeout) as some_cursor:
await some_cursor.execute('SET search_path=' + db_schema)
```

Yapf reformats it so that `cursor..` is indented to the same level as `await ..`, which causes pyflakes to complain about it.

My .style.yapf is
```
[style]
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.