google / google/yapf

Format code inside f-strings

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

Description

Yapf should also format code inside f-strings.

For example:

```python
f'{foo +bar}'
```
should be formatted to

```python
f'{foo + bar}'
```

Note that in order to be able to do this the parser from `lib2to3` should be fixed to parse f-strings. See https://bugs.python.org/issue33991.

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.