Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

black does not format expressions inside f-string #1201

Closed
werenike opened this issue Dec 12, 2019 · 1 comment
Closed

black does not format expressions inside f-string #1201

werenike opened this issue Dec 12, 2019 · 1 comment
Labels
T: bug Something isn't working

Comments

@werenike
Copy link

werenike commented Dec 12, 2019

Describe the bug
Black does not seem to format expressions inside f-strings.

To Reproduce
Example file contents:

1+2
f"{1+2}"

Result after running black:

1 + 2
f"{1+2}"

Expected behavior
Expected result after formatting:

1 + 2
f"{1 + 2}"

Environment:

  • Version: 19.10b0
  • OS and Python version: Arch Linux, Python 3.8.0

Does this bug also happen on master?
Yes (tried in online version)

@werenike werenike added the T: bug Something isn't working label Dec 12, 2019
@JelleZijlstra
Copy link
Collaborator

Duplicate of #567 (although this issue actually has a better title).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants